Set Facebook Application ID dynamically in flutter for iOS

Viewed 40

My iOS application requires multiple Facebook Applications. But, since we have to put the application ID and client ID on the info.plist file. So, it's impossible to switch or change the application ID without a dynamic way.

As per facebook documentation (https://developers.facebook.com/docs/reference/ios/3.24/class/FBSettings/), I found there is a method named setAppID/setDefaultAppID. Through this, I should be able to change the Facebook application ID dynamically. But, in the FBSDKCoreKit package, there are no such methods.

I tried:

  • FBSDKCoreKit.Settings.setAppID("appID") [No such method]
  • FBSDKCoreKit.Settings().setAppID("appID") [No such method]
  • FBSDKCoreKit.Settings.appId = "appID" [Doesn't work]
  • FBSDKCoreKit.Settings.shared.appId = "appID" [iOS application crashes]
0 Answers
Related