我正在尝试 facebook graph api 等功能like
。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}
我该如何解决?