FBSession: no AppID; either pass the AppID for init, or add a string key

When I open FBSession (FB SDK 3.0), I get this error:

FBSession: No AppID provided; either pass an AppID to init, or add a string valued key with the appropriate id named FacebookAppID to the bundle *.plist 

I know that I can add a value for FacebookAppID to .plist, but which method should I use to start FBSession using AppId? I tried using [FBSession setDefaultAppID], but that doesn't look like this.

+4
source share
4 answers

Typically, you need to call initWithAppId: from the Facebook SDK.

 - (id)initWithAppId:(NSString *)app_id andDelegate:(id<FBSessionDelegate>)delegate; 

See here: http://developers.facebook.com/docs/reference/iossdk/authentication/

+3
source

This seems to work for me:

 [FBSettings setDefaultAppID: @"123456789"]; 
+11
source

The new version of the SDK does not accept

 - (id)initWithAppId:(NSString *)app_id andDelegate:(id<FBSessionDelegate>)delegate; 

therefore, create FacebookAppID in the info.plist file and specify the application identifier as string input.

+9
source

For me, this problem arose because my project for some odd reason (probably caused joy by my copy and paste from previous projects) had 2 plist files! Thus, this information was not available on the reservoir that is read for FacebookAppID. I uninstalled plist, I didn’t want it, and then went back to my general application settings and selected the plist that I wanted in the "Identity" section. Boom! Fixed

+2
source

All Articles