我有一个运行以下代码的网站:
<iframe class="fanbox" width="472" height="220" src="http://www.connect.facebook.com/widgets/fan.php?href=<?php echo urlencode('http://www.facebook.com/my-website-page'); ?>&width=472&colorscheme=light&show_faces=true&stream=false&header=false&height=220&css=<?php echo urlencode('http://mywebsite.com/css/fb-style.css'); ?>"></iframe>
这是有效的,但似乎facebook删除了这种获取粉丝盒的方法。现在我收到一个404 Not Found Error: http://www.connect.facebook.com/widgets/fan.php
它真的被移走了?我现在怎么做呢?
你应该在这里使用Like Box。如果你只想要"粉丝"图像,然后取消勾选"流",直到你得到你想要的。然后点击"获取代码",在对话框中选择"IFrame"。
在您的示例中,它将是:
<iframe src="//www.facebook.com/plugins/likebox.php?href=<?php echo urlencode('YOUR_FB_URL'); ?>&width=292&height=258&show_faces=true&colorscheme=light&stream=false&border_color&header=false&" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:292px; height:258px;" allowTransparency="true"></iframe>