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]);
}
source
share