I'm trying to sign in with facebook in my application. I have tried this:
- (IBAction)connectWithFacebook:(id)sender
{
Facebook *facebook = [[Facebook alloc] initWithAppId:SHKCONFIG(facebookAppId) urlSchemeSuffix:SHKCONFIG(facebookLocalAppId) andDelegate:nil];
[facebook authorize:[NSArray arrayWithObjects:@"publish_stream", @"offline_access", @"email", @"user_hometown", @"user_birthday", @"user_location", @"user_checkins", @"user_likes", @"friends_checkins", nil]];
}
It is working in simulator, but not on device, although it used to work with both. Now, on device, it just opens the facebook app and the dialog where you should choose to allow the application or not, but it is empty with only the cancel button available which doesn't even redirect me to my app but keeps the application open.
Can you give some hint to what I'm doing wrong? Thanks
EDIT
It seems that if I uninstall the facebook application so it will Safari, it works. I doesn't work only if the facebook application is installed on the device.
After searching everywhere, I realized that the facebook application was not correctly configured. The bundle identifier was not the right one. Previously it had been working, but it seems that facebook made some modifications... I guess they did so to better integrate with the new iOS 6.