简体   繁体   中英

How to get the birth day of the friends in facebook using fql in ios sdk

i am new to ios sdk, recently i'm on project in which i get all the birth day of all friends in face book ,i did this using fql,i am able to get all other details except birthday,i get only null values for birthday,birthday_date column name.. i just add my code and the corresponding out of the code ,

CODE :

- (IBAction)getPublicInfo:(id)sender
{
 NSMutableDictionary * params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                                    @"SELECT       uid,first_name,middle_name,last_name,name,pic_small,pic_big,birthday,birthday_date FROM user WHERE uid IN (SELECT uid1 FROM friend WHERE uid2=me())", @"query",
                                    nil];
 [_facebook requestWithMethodName:@"fql.query"
                           andParams:params
                       andHttpMethod:@"POST"
                         andDelegate:self];
}

OUTPUT :

{
        birthday = "<null>";
        "birthday_date" = "<null>";
        "first_name" = Mohamed;
        "last_name" = Sadik;
        "middle_name" = "";
        name = "Mohamed Sadik";
        "pic_big" = "http://profile.ak.fbcdn.net/hprofile-ak-snc4/161194_100000520462852_5798920_n.jpg";
        "pic_small" = "http://profile.ak.fbcdn.net/hprofile-ak-snc4/173417_100000520462852_4252833_t.jpg";
        uid = 100000520462852;
    }

您需要允许user_birthday的权限

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM