Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FBSession: No AppID provided; either pass an AppID to init, or add a string valued key

Tags:

ios

facebook

When I open a 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 I can add a value for FacebookAppID in the .plist, but what method should I use to init the FBSession with an AppId? I have tried using [FBSession setDefaultAppID] but that doesn't seem to do it.

like image 329
HoratioCain Avatar asked Nov 29 '22 02:11

HoratioCain


2 Answers

This seems to work for me:

[FBSettings setDefaultAppID: @"123456789"];
like image 137
Saxon Druce Avatar answered Nov 30 '22 16:11

Saxon Druce


The new version of SDK doesn't accept

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

so Create a FacebookAppID in the info.plist file and give the app id as string input.

like image 21
Abhilash Reddy kallepu Avatar answered Nov 30 '22 18:11

Abhilash Reddy kallepu