get Facebook user profile data after getting access token in iOS 5

后端 未结 3 1467
有刺的猬
有刺的猬 2020-12-21 15:12

I am working on an iOS 5 app where i need to get user profile data after successful login.

For now I am getting a access token when user get successful login.

<
3条回答
  •  梦毁少年i
    2020-12-21 15:42

    in your .h

    #import
    

    Now in Your .m file just call below method to get user data

    -(void)loginViewFetchedUserInfo:(FBLoginView *)loginView user:(id)user{
        NSLog(@"usr_id::%@",user.id);
        NSLog(@"usr_first_name::%@",user.first_name);
        NSLog(@"usr_middle_name::%@",user.middle_name);
        NSLog(@"usr_last_nmae::%@",user.last_name);
        NSLog(@"usr_Username::%@",user.username);
        NSLog(@"usr_b_day::%@",user.birthday);
    
      }
    

    Above method is defined in FBLoginView.h you can see there.

    This method i have added According to latest facebookSDK.framework.Hope it will help you.

提交回复
热议问题