Search code examples
iosfacebookfbconnect

FB ios SDK is not returning to the app - not able to find issue in the plist


I am creating an ios app which will use fb login services. I have create a new class fbConnect, which has all the fb functions - the class can be included in the relevant files, which can then use fb related functions.

I create session as follows:

 - (void) createSession
{

if(!fbSession.isOpen)
{
if (!fbSession || fbSession.state != FBSessionStateCreated)
{
    fbSession = [[FBSession alloc] init];
}

[fbSession openWithCompletionHandler:^(FBSession *session,
FBSessionState status,
NSError *error) {
    [self sessionStateChanged:session state:status error:error];

}];

  }
}

The problem is that the call to fb never returns to the app - there is no call to the completion handler. If i try to use safari, it says that the url does not exist.

I have checked and re-checked the plist settings - they seem to be fine. Is there a problem in defining the functions in a separate file and not doing anything in appdelegate?

EDIT 1: I think i was wrong earlier, the problem is with the plist; however, i am not able to figure out the problem. Can someone help? Am not able to post images, but the link to image of my plist is https://i.sstatic.net/K7BqG.png


Solution

  • I deleted and reset the settings in the info.plist and voila! Important point to note was that instead of writing the name of the setting, i chose the apt setting from the drop down menu that appears when changing values in info.plist. It should not really matter, but it did.