Error at break: facebook sdk version not specified

I am updating as a facebook button on my website. I just followed the instructions on the facebook developer page, I get the following error:

Search error: the version that is located on line 82 of the facebook sdk (sdk.js) is not specified

The code is as follows:

<div class="fb-like" data-href="https://www.facebook.com/fan-page-x" data-layout="button" data-action="like" data-show-faces="true" data-share="true"></div> <div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&appId=xxxx&version=v2.0"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script> 

A similar button appears on the page, but I get an error in the console.

+2
javascript facebook facebook-like
May 15 '14 at 3:03
source share
1 answer

make sure your page does not have the FB JS SDK initialization code.

+2
May 20 '14 at 9:22
source share



All Articles