Facebook SDK for Android - set Application ID programmatically

后端 未结 5 1185
逝去的感伤
逝去的感伤 2020-12-29 10:56

I have a native Android app that needs to connect to a different Facebook app (different Application ID) based on an app setting that can be changed at runtime.

Ima

5条回答
  •  被撕碎了的回忆
    2020-12-29 11:50

    Hello all i know above answer is right for older sdk version, but in facebook sdk 4 there is no Session class

    You can simply do it by using this single line code:

    FacebookSdk.setApplicationId(APP_ID);
    

    Thanks!

提交回复
热议问题