Facebook login doesn't work when Facebook app is installed on iPhone

I suffer the problem of logging in to Facebook. If the Facebook application is not installed on the iPhone, then I open the Facebook login in the browser and it works fine after reinstalling my application, but if I install the Facebook application on my iPhone and check the Facebook login, it goes through my application and it works fine works if it is the first time. After logging into Facebook, if I delete my application and reinstall it, it will not open the login page, and I get an error message - "Invalid sso_key parameter. The key com.boxscoregames.S1 does not match the allowed packet identifiers. IOS bundle ID in http: //developers.facebook.com/apps/265799363556746 "

Here is my Facebook login code -

-(void)loginViewShowingLoggedInUser:(FBLoginView *)loginView
{
  NSLog (@"You are logged in.");
}
-(void)loginViewFetchedUserInfo:(FBLoginView *)loginView user:(id<FBGraphUser>)user
{
   NSLog(@"%@",user);
   globalUserName = [NSString stringWithFormat:@"fb%@",[user objectForKey:@"id"]];
   globalEmail = [user objectForKey:@"email"];
   globalUserId = [user objectForKey:@"id"];
   globalFirstName = [user objectForKey:@"first_name"];
   globalLastName = [user objectForKey:@"last_name"];
   globalProfilePic = user.objectID;
   fbAccessToken = [[[FBSession activeSession]accessTokenData]accessToken];
   hud = [appDel indicator];
   [self.view addSubview:hud];

   BOOL internetBool = [appDel isInternetReachable];
   if (internetBool) {
    NSLog(@"Internet is there");
    [hud show:YES];
    [self fbLoginWebService];    }
  else
  {
    [self showAlertWithMessage:@"No network connection. Please try again."];
  }
}
-(void)loginViewShowingLoggedOutUser:(FBLoginView *)loginView
{}
-(void)loginView:(FBLoginView *)loginView handleError:(NSError *)error
 {
    NSLog(@"%@",[error localizedDescription]);
 }
+4
source share
2 answers

I know I'm late, but someone might be helpful. As Ming Li said, you have problems with your package ID. You must change it to your Xcode package ID. Two identifiers must match. The easiest way is to follow the quickStart guide line at https://developers.facebook.com/quickstarts/ , and in the "provide us your package identifier" section, just copy and paste your Xcode package identifier. It worked for me.

+3
source

URL? , , com.boxscoregames.S1, SSO .

com.boxscoregames.S1 - , , iOS https://developers.facebook.com/apps/265799363556746/settings/

0

Source: https://habr.com/ru/post/1570262/


All Articles