Phonegap Facebook connect plugin settings

后端 未结 3 1561
无人及你
无人及你 2021-02-15 19:34

I\'m using phonegap plugin to connect to facebook this one : https://github.com/phonegap-build/FacebookConnect

I\'m confused about Facebook app settings, when I call FB.

相关标签:
3条回答
  • 2021-02-15 19:52
     Write this code in onDeviceReady after creating your application id on facebook
    
    
     FB.init({
                appId: "<your appId>",
                nativeInterface: CDV.FB
     });
    
    0 讨论(0)
  • 2021-02-15 19:59

    on facebook eit your app settings set your "Website with Facebook Login" to

    http://localhost/
    
    0 讨论(0)
  • 2021-02-15 20:03

    There are several settings which you need to set.
    These settings worked for me for a Phonegap Build environment.

    Under Native Android App:

    • package name: the "widget id" you have in your config.xml (e.g. com.aaa.bbb)
    • class name: the "widget id" with ".ProjectActivity" appended (e.g. com.aaa.bbb.ProjectActivity)
    • key hash: generate the key hash using the android instructions. Facebook explains this at https://developers.facebook.com/docs/android/getting-started/facebook-sdk-for-android/
    • facebook login: enabled
    • deep linking: disabled

    Other steps:

    • You don't need to set "Website with Facebook Login (site url) " to http://localhost/ anymore. If you have a real website (with facebook login), then that's the place to put the real website URL.
    • Ensure sandbox mode is disabled
    0 讨论(0)
提交回复
热议问题