开发者

facebook graph API and parsing results in objective-C

I am calling this:

facebook requestWithGraphPath:@"me/friends" andDelegate:self]

Now I am confused on what facbook returns to me in the delegate?

How should I parse this in the (void) request:(FBRequest*) request didLoa开发者_高级运维d:(id) result method? Is it returned as a dictionary?


Yes, I think it is always a dictionary. Here is some sample code for handling the "me/friends" call:

for (NSDictionary *friendData in [result objectForKey:@"data"])
{
    id friendId = [friendData objectForKey:@"id"];
    // Extract other information about the friend
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜