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
}
精彩评论