1
我在ios中使用facebook圖形api來分享來自iphone的新聞動態。但我得到以下錯誤:ios中的facebook圖形api錯誤 - 未知路徑組件
{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);
}
相同的代碼工作,如果我嘗試共享新聞複製的照片類型。我在哪裏錯了?我如何解決這個問題?
您可以分享您在進行API調用的代碼嗎?一件很簡單的事情是,你可能想要考慮傳遞你的參數,例如:link,而不是將它附加到我/ feed端點。 –