Facebook graph API and objective-C analysis results

I call it:

facebook requestWithGraphPath: @ "me / friends" and Delegate: self]

Now am I confused that facbook is returning to me as a delegate?

How should I parse this in a request (void): (FBRequest *) request didLoad: (id) result method? Does it come back like a dictionary?

+3
source share
1 answer

Yes, I think this is always a dictionary. Here is a sample code to handle the call to "me / friends":

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

Source: https://habr.com/ru/post/1771415/


All Articles