Facebook推荐多域名

时间:2011-10-28 09:08:14

标签: facebook plugins

我想写一个页面,想要使用facebook推荐插件。我希望从许多不同的域中获得建议。我检查了教程,但它只能从每个iframe的1个域获取数据。所以,如果我想从10个域获取,我需要10个iframe? 10个连接?是否有更好的方法。

对不起,如果我的英语不好。

1 个答案:

答案 0 :(得分:1)

site参数允许您使用逗号分隔值添加多个域。示例如下shawnsspace.com,anotherfeed.com,walmart.com

请参阅Attribues - site - 以逗号分隔的域列表,以显示建议。 XFBML版本默认为当前域。

https://developers.facebook.com/docs/reference/plugins/recommendations/

XFBML

<fb:recommendations site="shawnsspace.com, anotherfeed.com, walmart.com" width="300" height="900" header="true"></fb:recommendations>

HTML5

<div class="fb-recommendations" data-site="shawnsspace.com, anotherfeed.com, walmart.com" data-width="300" data-height="900" data-header="true"></div>

IFRAME

<iframe src="//www.facebook.com/plugins/recommendations.php?site=shawnsspace.com%2C+anotherfeed.com%2C+walmart.com&amp;width=300&amp;height=900&amp;header=true&amp;colorscheme=light&amp;linktarget=_blank&amp;border_color&amp;font&amp;appId=148744491883305" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:300px; height:900px;" allowTransparency="true"></iframe>
相关问题