我正试图在我的网站上嵌入一个facebook活动。我使用'嵌入事件'按钮从facebook获取了代码,但它不断抛出错误:Invalid App Id: Must be a number or numeric string representing the application id.
,FB.getLoginStatus() called before calling FB.init().
和This Facebook post is no longer available. It may have been removed or the privacy settings of the post may have changed.
这是代码:
<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/all.js#xfbml=1"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-post" data-href="#" data-width="466">
<div class="fb-xfbml-parse-ignore">
<a href="#">Post</a>
by
<a href="#">User</a>.
</div>
</div>
注意:为了我的隐私,我用“#”替换了所有href:P
答案 0 :(得分:0)
如果您的网站基于Wordpress安装,请仔细检查您的帖子页面源代码。如果<script>
标记被剥离,可能是由用户的权限引起的。尝试将一个Facebook帖子嵌入Wordpress管理员,它会工作。在我的情况下,这是一个愚蠢的问题......