我有多个应用程序使用fb:friend-selector
表单元素不再显示。代码中没有任何更改。
示例:
<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>发布于 2011-09-26 20:58:54
刚刚找到了一个解决方案,抛弃标准的html <form>,改用<fb:editor>。是的,这可能不是您想要的,但现在<fb:friend-selector>将呈现。
发布于 2011-09-01 12:35:46
尝试使用FB.XFBML.parse显式解析XFBML:
http://developers.facebook.com/docs/reference/javascript/FB.XFBML.parse/
我还建议将它放在某个div元素中
FB.XFBML.parse(document.getElementById('MY\_DIV'));https://stackoverflow.com/questions/7265210
复制相似问题