How to fetch online Facebook friends in iPhone using Graph API?
I want to fetch the Facebook user's online friends using Graph API but I am not able to find any help from the net.
I am able to fetch the user's friends usin开发者_运维问答g Graph API but i want to know who are currently online, also more info about the user's friends like the image URL, date of birth, etc.
I am only able to fetch the user's friend's id and name using the following line of code
[_facebook requestWithGraphPath:@"me/friends" andDelegate:self];
Can anyone help me with this.
This is currently not possible using the graph API.
According to a facebook dev forum thread on the subject there are ways to do this by calling a php script that the website itself uses in AJAX requests, or using XMPP
if ([result isKindOfClass:[NSDictionary class]])
{
NSLog(@"count : %d ", [result count]);
NSArray* resultArray = [result allObjects];
NSLog(@"count : %d ", [result count]);
result = [resultArray objectAtIndex:0];
NSLog(@"count : %d ", [result count]);
result = [result objectAtIndex:0];
[self.label setText:[result objectForKey:@"name"]];
}
精彩评论