2012-08-01 2 views
1

FBConnect sdk를 사용하여 Facebook에 게시하려고합니다.
그림에 대한 링크를 제공하면 모든 것이 잘 동작합니다.
enter image description here

하지만 그림이 누락되면 다른 정보는 표시되지 않습니다.
enter image description here
내가 잘못했거나이 오류는 FBConnect의 버그입니다.
코드는 다음과 같습니다그림이없는 경우 FB 피드 대화 상자에 정보 없음


    NSMutableDictionary *params = [NSMutableDictionary dictionary]; 
     [params setValue:name forKey:@"name"]; 
     [params setValue:address forKey:@"caption"]; 
     [params setValue:descrption forKey:@"description"]; 
     [params setValue:website forKey:@"link"]; 
     if(thumbnail.serverPath) 
      [params setValue:thumbnail.serverPath forKey:@"picture"]; 

     [facebook dialog:@"feed" andParams:params andDelegate:self]; 

답변

1

공급 대화에서 누락 된 정보로 문제를 나타냈다.
는 제대로 정보를 표시하는 것을 또는 사진PARAMS 사전에 설정해야합니다 링크 중 하나를 밝혀졌다.
확실하지 않은 이유는 무엇입니까? 그러나 어쨌든, 문제를 해결 한 새로운 코드는 다음과 같습니다.


     NSMutableDictionary *params = [NSMutableDictionary dictionary]; 
     [params setValue:name forKey:@"name"]; 
     [params setValue:address forKey:@"caption"]; 
     [params setValue:descrption forKey:@"description"]; 
     [params setValue:website forKey:@"link"]; 
     if(thumbnail.serverPath) 
      [params setValue:thumbnail.serverPath forKey:@"picture"]; 

     //IMPORTANT 
     //Before posting check that there is a valid link for the picture. 
     //If not, then add 
     //to ensure that rest of the info is displayed correctly in the feed. 
     if(![params valueForKey:@"picture"]) { 
      [params setValue:@"http://www.abc.com/images/xyz.png" forKey:@"picture"]; 
     } 

     [facebook dialog:@"feed" andParams:params andDelegate:self]; 
관련 문제