Facebook Like Box 无法使用

发布于 2024-08-30 19:09:20 字数 706 浏览 8 评论 0原文

我正在尝试将 Facebook“Like Box”添加到现有网站,如 此处描述

我正在推广的页面在该页面的预览框中运行得很好。

但是,当我复制/粘贴代码(如我的网站所示)时,它显示的是空白 Facebook 页面的一小部分,只有部分可见的错误消息。

<iframe src="http://www.facebook.com/plugins/likebox.php?profile_id=SenRandyGordon&amp;width=260&amp;connections=10&amp;stream=true&amp;header=true"
        scrolling="no" 
        frameborder="0" 
        allowTransparency="true" 
        style="border:none; overflow:hidden; width:260px; height:px"></iframe>

我不知道自己做错了什么,在 Facebook 发布新 API 之前,我过去添加了“Like Box”。

请帮忙?

I'm trying to add a Facebook "Like Box" to an existing website, as described here

The Page I'm promoting works just fine in preview-box on that page.

But when I copy/paste the code as shown to my website, it instead shows a fraction of an empty facebook page with only a partially visible error message.

<iframe src="http://www.facebook.com/plugins/likebox.php?profile_id=SenRandyGordon&width=260&connections=10&stream=true&header=true"
        scrolling="no" 
        frameborder="0" 
        allowTransparency="true" 
        style="border:none; overflow:hidden; width:260px; height:px"></iframe>

I cannot figure out what I'm doing wrong, and I added "Like Box"'s in the past, before Facebook released their new API.

Please help?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

忆依然 2024-09-06 19:09:20

解决方案

You have to replace all the "&" of the Facebook Likebox generator code with "&" - then it works.

将此方法与 Lemmy 的方法结合起来即可使其发挥作用。

所以最终结果看起来像这样

<iframe src="http://www.facebook.com/plugins/likebox.php?profile=1&id=SenRandyGordon&width=260&connections=10&stream=true&header=true" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:260px; height:px"></iframe>

Solution

You have to replace all the "&" of the Facebook Likebox generator code with "&" - then it works.

Combine this method with Lemmy's method to make it work.

So the final result looks like these instead

<iframe src="http://www.facebook.com/plugins/likebox.php?profile=1&id=SenRandyGordon&width=260&connections=10&stream=true&header=true" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:260px; height:px"></iframe>
萤火眠眠 2024-09-06 19:09:20

我复制并粘贴了为 iframe 提供的代码,但它不起作用。我发现代码前面没有http:。一旦我把它放在那里,一切都很完美。

I copied and pasted the code supplied for the iframe, and it didn't work. I discovered there was no http: before the code. Once I put it there, everything worked perfectly.

做个少女永远怀春 2024-09-06 19:09:20

我在使用 Facebook 的社交插件时也遇到了同样的问题。
在此插件中,如果用户输入错误,则安全问题会附带随机生成的 2 个单词的代码,但用户只能查看 1 个单词意味着它显示部分部分。

这是另一个解决方案...它确实有效!

<script type='text/javascript' src='http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php/en_US'> 
</script>
<script type='text/javascript'>FB.init('aaafdced248eed501f09f66e3c5b7de9');</script>
<fb:fan profile_id=\"118774364811981\" stream=\"0\" connections=\"10\" logobar=\"0\" width=\"244\" height=\"240\" css='serverside_facebook.css?1'> 
</fb:fan>

我在Java中使用了上面的代码verticalPanel.getElement().setInnerHTML("above code");

它确实有效!

I also faced same problem using facebook's social plugin.
In this plugin if user enter wrong input then security question comes with random generated code with 2 words, but user can view only 1 word means it shows partial part..

Here is Onther solution .... It Really Works!!!

<script type='text/javascript' src='http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php/en_US'> 
</script>
<script type='text/javascript'>FB.init('aaafdced248eed501f09f66e3c5b7de9');</script>
<fb:fan profile_id=\"118774364811981\" stream=\"0\" connections=\"10\" logobar=\"0\" width=\"244\" height=\"240\" css='serverside_facebook.css?1'> 
</fb:fan>

I used above code in Java verticalPanel.getElement().setInnerHTML("above code");

It really works!

您的好友蓝忘机已上羡 2024-09-06 19:09:20

profile_id=SenRandyGordon 更改为 profile=1&id=SenRandyGordon
它对我有用

Change profile_id=SenRandyGordon to profile=1&id=SenRandyGordon
It work for me

百合的盛世恋 2024-09-06 19:09:20

尝试 Thins iframe 代码工作正常并由我在 WordPress 上测试

<iframe src="//www.facebook.com/plugins/likebox.php?href=https%3A%2F%2Fwww.facebook.com%2FEnter_Your_FB_ID_OR_USERNAME&width&height=290&colorscheme=dark&show_faces=true&header=true&stream=false&show_border=true" scrolling="no" frameborder="0" style="border:none; overflow:hidden; height:290px;" allowTransparency="true"></iframe>

try thins iframe code working fine and tested by me on wordpress

<iframe src="//www.facebook.com/plugins/likebox.php?href=https%3A%2F%2Fwww.facebook.com%2FEnter_Your_FB_ID_OR_USERNAME&width&height=290&colorscheme=dark&show_faces=true&header=true&stream=false&show_border=true" scrolling="no" frameborder="0" style="border:none; overflow:hidden; height:290px;" allowTransparency="true"></iframe>
追我者格杀勿论 2024-09-06 19:09:20

约翰的回答可能有效。没试过。这对我有用:
将嵌入代码中的 profile_id= 更改为 id=

John's answer might work. Haven't tried it. This worked for me:
change profile_id= to just id= in the embed code.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文