like
などの機能のために Facebook グラフ API を試していますshare
。特定の友人のニュースフィードを共有する必要があります。ニュースフィードは、写真、ビデオ、リンク、またはステータス更新のいずれでもかまいません。ステータスの更新以外はすべて共有できます。以下は私のコードです:
if ([strType isEqualToString:@"status"]) {
[[resultArrFeed objectAtIndex:selectedIndex] objectForKey:@"message"];
if (text == nil) {
text = [[resultArrFeed objectAtIndex:selectedIndex] objectForKey:@"story"];
}
NSDictionary *dict = [resultArrFeed objectAtIndex:selectedIndex];
NSLog(@"dic : %@", dict);
NSString *str = [[dict valueForKey:@"actions"] valueForKey:@"link"][0];
dic=[NSDictionary dictionaryWithObjectsAndKeys:str,@"link",nil];
request=[NSMutableString stringWithString: @"me/feed/"];
// [dic setValue:str forKey:@"link"];
NSLog(@" %@", str);
}
共有時に次のエラーが表示されます。
Error Domain=com.facebook.sdk Code=5 "The operation couldn’t be completed. (com.facebook.sdk error 5.)" UserInfo=0xaaa9a20 {com.facebook.sdk:ParsedJSONResponseKey={
body = {
error = {
code = 1500;
message = "(#1500) The url you supplied is invalid";
type = OAuthException;
};
};
code = 400;
}, com.facebook.sdk:HTTPStatusCode=400}
どうすれば解決できますか?