开发者

Getting Friends List of Facebook from iPhone application

Is there any way or code snippet from where I can get the idea of gett开发者_如何学JAVAing friends list of a facebook user for iPhone SDK from an iPhone application?

Thanks.


I hope this might be helpful to you

http://www.capturetheconversation.com/technology/iphone-facebook-oauth-2-0-and-the-graph-api-a-tutorial-part-2

Along with this you can also learn great things from

http://developers.facebook.com/docs/reference/api


https://github.com/reallylongaddress/iPhone-Facebook-Graph-API

This may helpful to you


//try this code 

- (void) getFriendName :(id) sender {

        self.modeString = @"friendName";

        NSString * query = [NSString stringWithFormat:@"SELECT name FROM user WHERE uid IN (SELECT uid1 FROM friend WHERE uid2=me())",appDelegate.friendList];
        NSLog(@"query :%@",query);
    //    NSString * query = [NSString stringWithFormat:@"SELECT uid, first_name, last_name, birthday_date, sex, pic_square, current_location, hometown_location FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) AND strlen(birthday_date) != 0 ORDER BY birthday_date",appDelegate.friendList];
        NSMutableDictionary * params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                                        query, @"query",
                                        nil];
        [_facebook requestWithMethodName:@"fql.query"
                               andParams:params
                           andHttpMethod:@"POST"
                             andDelegate:self];
    }
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜