iOS で Facebook グラフ 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);
}
写真タイプのニュースフィードを共有しようとすると、同じコードが機能します。どこで間違っていますか?この問題を解決するにはどうすればよいですか?