1

저는 최신 SDK를 사용 중이며 페이스 북에 기사를 게시하려하지만 어떤 이유로 그것이 작동하지 않습니다. 이 코드를 사용하려고하면 그것은Facebook에 이야기를 게시 할 수 없습니다.

NSMutableDictionary<FBGraphObject> *action = [FBGraphObject graphObject]; 
action[@"funtone"] = @"http://samples.ogp.me/491689410900420"; 

[FBRequestConnection startForPostWithGraphPath:@"me/pelephoneil:listen_to" 
            graphObject:action 
          completionHandler:^(FBRequestConnection *connection, 
               id result, 
               NSError *error) { 
           // handle the result 
          }]; 

을 작동하지 않습니다 : :이 코드를 게시하려고 할 경우에만 작동하고

id<FBGraphObject> listenObject = 
[FBGraphObject openGraphObjectForPostWithType:@"pelephoneil:listen_to" 
             title:@"FunTune" 
             image:@"https://example.com/cooking-app/images/Lamb-Vindaloo.png" 
              url:@"https://example.com/cooking-app/meal/Lamb-Vindaloo.html" 
            description:@"text for sample to sample"]; 

id<FBOpenGraphAction> songAction = (id<FBOpenGraphAction>)[FBGraphObject graphObject]; 
[songAction setObject:listenObject forKey:@"FunTone"]; 

[FBDialogs presentShareDialogWithOpenGraphAction:songAction 
             actionType:@"pelephoneil:listen_to" 
          previewPropertyName:@"FunTune" 
             handler:^(FBAppCall *call, NSDictionary *results, NSError *error) { 
              if(error) { 
               NSLog(@"Error: %@", error.description); 
              } else { 
               NSLog(@"Success!"); 
              } 
             }]; 

사람이 문제가 될 것으로 보인다 무엇인지 말해 줄 수 있습니까?

답변

2

나는 아마 당신은이를 알아 냈어요 기대하지만, openGraphObjectForPostWithType 호출의 유형은 객체 (FunTune),하지 작업 (listen_to)해야하기 때문에 그것은

또한주의 아마 그 previewPropertyName 당신 ' 사용 된 "FunTune"은 당신이 저장 한 "FunTone"과 다릅니다.