我有多個應用程序使用fb:朋友選擇器fb:朋友選擇器不出現
表單元素不再出現。代碼中沒有任何改變。
例子:
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : 'myyappid',
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true, // parse XFBML
channelUrl : 'http://mydomain.com/channel.html', // Custom Channel URL
oauth : true //enables OAuth 2.0
});
};
(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>
<fb:serverfbml>
<script type="text/fbml">
<fb:fbml>
<fb:friend-selector />
</fb:fbml>
</script>
</fb:serverfbml>
使用FB.XFBML.parse不會呈現fb:friend-selector。 我注意到,當它放在一個fb:request-form中時它會渲染。但是,我不想發送請求。我想以常規形式使用朋友選擇器作爲元素。 –
我的回答也有幫助嗎?如果你不需要請求表單,我建議使用請求對話框,它非常簡單:http://developers.facebook.com/docs/reference/dialogs/requests/ –
我不想要請求對話框或表單。我想要一個具有各種非fbml元素和fb:friend-selector的常規表單。這用於工作。現在fb:friend-selector不渲染。嘗試FB.XFBML.parse沒有做任何事情。感謝您的建議。 –