0
我想在用戶的牆上發佈示例消息。但FB.ui
方法不會執行,並且我收到一條消息,指出「發生錯誤,請稍後再試」。這是身體內的代碼:在牆上發佈消息時出錯
<div id="fb-root"></div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"
type="text/javascript"></script>
<script>
window.fbAsyncInit = function() {
alert('hiee');
FB.init({appId: '259494234140448', status: true, cookie: true,
xfbml: true});
};
(function() {
var e = document.createElement('script');
e.async = true;
e.src = document.location.protocol +
'//connect.facebook.net/en_US/all.js';
document.getElementById('fb-root').appendChild(e);
}());
</script>
<script type="text/javascript">
function publish_to_wall(){
FB.ui({ method: 'stream.publish',
message: 'This is a simple post to appshack.tv' });
}
</script>
}
<a href="javascript:publish_to_wall()">Publish to your wall</a>
記住你不能再使用'message'參數了。你必須使用'描述'參數。 – Philip 2012-04-04 05:38:21