I want to retrieve third_party_id of the Facebook's user in my ios application using Facebook SDK. Currently i am trying this
[FBSession openActiveSessionWithPublishPermissions:@[@"basic_info", @"email", @"user_likes",@"user_mobile_phone",@"publish_actions",@"third_party_id"] defaultAudience:FBSessionDefaultAudienceFriends allowLoginUI:YES completionHandler: ^(FBSession *session, FBSessionState state, NSError *error) {
// Handler for session state changes
// This method will be called EACH time the session state changes,
// also for intermediate states and NOT just when the session open
[self sessionStateChanged:session state:state error:error];
}];
If i add third_party_id in permissions i am getting following error
**Error Domain=com.facebook.sdk Code=2 "Invalid Scope: third_party_id" UserInfo=0xd26ff50** {
com.facebook.sdk:ErrorSessionKey=<FBSession: 0x11f817f0, state: FBSessionStateClosedLoginFailed, loginHandler: 0x0, appID: 230846087119839, urlSchemeSuffix: , tokenCachingStrategy:<FBSessionTokenCachingStrategy: 0xc689090>, expirationDate: (null), refreshDate: (null), attemptedRefreshDate: 0001-12-30 00:00:00 +0000, permissions:(null)>, com.facebook.sdk:ErrorLoginFailedReason=com.facebook.sdk:UserLoginOtherError, NSLocalizedDescription=Invalid Scope: third_party_id, com.facebook.sdk:ErrorLoginFailedOriginalErrorCode=100
}
How can i overcome this ? If i retrieve the user profile normally i am not getting third_party_id I am getting this parameter
{
email = "xxx@xxx.com";
"first_name" = xxxx;
gender = male;
id = xxxxx;
"last_name" = Mehta;
link = "https://www.facebook.com/xxxxxxxx";
locale = "en_US";
name = "xxxxxxx";
timezone = "5.5";
"updated_time" = "2014-04-01T08:52:10+0000";
username = "xxxxxxxxx";
verified = 1;
}