我在 ios 中使用 facebook graph api 来分享来自 iphone 的新闻提要。但我收到以下错误:
{com.facebook.sdk:ParsedJSONResponseKey={
body = {
error = {
code = 2500;
message = "Unknown path components: /http://newswatch.nationalgeographic.com/2013/01/20/top-25-wild-bird-photographs-of-the-week-34;
type = OAuthException;
};
};
code = 400;
}, com.facebook.sdk:HTTPStatusCode=400}
以下是我在 btnClick 上共享新闻源的代码的一部分:
if ([strType isEqualToString:@"link"]) {
text = [[resultArrFeed objectAtIndex:selectedIndex] objectForKey:@"caption"];
if (text == nil) {
text = [[resultArrFeed objectAtIndex:selectedIndex] objectForKey:@"name"];
}
if (text == nil) {
text = [[resultArrFeed objectAtIndex:selectedIndex] objectForKey:@"story"];
}
NSDictionary *dict = [resultArrFeed objectAtIndex:selectedIndex];
dic=[NSDictionary dictionaryWithObjectsAndKeys:text,@"message",nil];
NSLog(@"%@", dict);
// NSString *str = [dict valueForKey:@"link"];
NSString *str = [dict valueForKey:@"link"];
request=[NSMutableString stringWithString: @"me/feed/"];
[request appendString:str];
NSLog(@"appended : %@", request);
}
如果我尝试共享一种photo
新闻源,则相同的代码可以工作。我哪里错了?我该如何解决这个问题?