Search code examples
iosfacebook

Easiest way to fetch Facebook friends info in iOS


What is the easiest way to fetch Facebook friends info (names,birthdays and etc) in JSON format. I'd like not to use FB iOS SDK if possible use UIWebView.

I think it is possible with 2-3 http requests. Is it possible?


Solution

  • Try out the below function to get your faceBook Info (logged in user info)

    - (void)fetchUserDetails {
    NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                                   @"SELECT uid, name, pic FROM user WHERE uid=me()", @"query",nil];
    
    [fb requestWithMethodName:@"fql.query"
                                     andParams:params
                                 andHttpMethod:@"POST"
                                   andDelegate:self];}
    

    Hope this helps