我想在用户登录Facebook时显示Facebook推荐插件。我不想在用户未登录Facebook时显示插件,因为结果看起来不合适。这甚至有可能吗?我将如何实现这个到我的网站?用户登录时显示Facebook推荐插件
谢谢你! 马卡
Facebook的社交插件(建议) https://developers.facebook.com/docs/reference/plugins/recommendations/
我已经有了的Javascript SDK像在页面下方实现。我也在页面中加载了jQuery1.5.2。
<div id="fb-root"></div> <script>
window.fbAsyncInit = function() {
FB.init({
appId : 'APP ID',
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true, // parse XFBML
channelUrl : 'http://urltomysite.com/channel.html' // custom channel
}); };
(function() {
var e = document.createElement('script');
e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
e.async = true;
document.getElementById('fb-root').appendChild(e);
}());</script>
这里是标签为recomendations插件
<fb:recommendations site="urltomysite.com" width="300" height="300" header="true" font="" border_color=""></fb:recommendations>
你是什么意思的 “结果看起来令人不快的” 吗?因为我在我的网站使用它,它看起来很好。 – Balanivash