FB init function gives wrong version error

后端 未结 20 1154
故里飘歌
故里飘歌 2020-12-08 18:18

I\'m using the Facebook JS sdk, and I have created a new App today. Everything is configured properly. Using init function like:

window.fbAsyncInit = functio         


        
20条回答
  •  时光说笑
    2020-12-08 18:51

    This problem plagued me for a while. I tried many of the ideas listed here such as changing the version number and moving/removing the fb-root.

    What is finally working well for me is to delete the entire window.fbAsyncInit function and specify the init properties in the hash of sdk.js. For example:

    
    

    Of course you may omit a parameter to use its default value.

    I can't find this approach documented anywhere so use it at your own risk. Luckily I was upgrading an older site from v1.x to v2.x and it used this technique when loading all.js.

提交回复
热议问题