FB init function gives wrong version error

后端 未结 20 1379
故里飘歌
故里飘歌 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 19:07

    I had the same problem when I tried to embed a simple Facebook post in an article I was writing.

    Een teleurstellende middag in De Kuip. Ook ADO Den Haag bleek vanmiddag te sterk voor Feyenoord. http://bit.ly/1UA3ZxZADO Den Haag too strong for Feyenoord. http://bit.ly/1UA6rEN

    Posted by Feyenoord Rotterdam on Sunday, January 31, 2016

    When I debugged the Facebook sdk.js I saw that the .getVersion returned "undefined" and thus not rendering the widget.

    Apparently Facebook can't handle passing query parameters seperated by & instead of & when loading the sdk.js. I had changed my code to & for validation reasons.

    Works:        js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.3";
    Doesn't Work: js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.3";
    

提交回复
热议问题