未捕获错误:没有版本指定facebook sdk [英] Uncaught Error: No version specified facebook sdk

查看:110
本文介绍了未捕获错误:没有版本指定facebook sdk的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在更新我的网站中的像Facebook按钮,我刚按照Facebook开发者页面中的说明,我收到以下错误:

I'm updating the like facebook button in my website I just followed the instructions in the facebook developer page, I'm getting the following error:

未捕获错误:没有指定的版本
位于Facebook SDK(sdk.js)的第82行

Uncaught Error: No version specified that's located in the line 82 of the facebook SDK (sdk.js)

代码如下:

<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>

类似按钮出现在页面上,但我在控制台中收到错误。

The like button appears on the page but I get the error in the console.

推荐答案

确保您的页面中没有其他FB JS SDK初始化代码。

make sure you don't have another FB JS SDK initialization code in your page.

这篇关于未捕获错误:没有版本指定facebook sdk的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆