Search code examples
iosfacebook-ios-sdk

Facebook SDK iOS - how to set Application ID dynamically from code?


I'm trying to set the Facebook's AppId from code, so I can choose to which app to connect to (between 2 apps, one of them is a test app).

Basically I'm looking for an equivalent for Android's SDK call:

FacebookSdk.setApplicationId(ACTIVE_APP_ID);

I'm aware of the deprecated iOS call:

[FBSettings setDefaultAppID:ACTIVE_APP_ID];

But can't seem to find alternative to it. I'm using SDK ver 4.22.1. Thanks!


Solution

  • Maybe you can try :

    [FBSDKSettings setAppID:ACTIVE_APP_ID];
    

    (I am using version 4.29.0 of FBSDK).