0
每次我嘗試添加我的var記錄時,它都不會運行postToFeed函數試圖弄清楚這幾天,沒有任何幫助會很棒!Javascript var is not loading in facebook post to feed
<div id='fb-root'></div>
<script src='http://connect.facebook.net/en_US/all.js'></script>
<p><a onclick='postToFeed(); return false;'>Post to Feed</a></p>
<p id='msg'></p>
<script>
FB.init({appId: "XXXXXXXXXXXX", status: true, cookie: true});
function postToFeed() {
// calling the API ...
var obj = {
method: 'feed',
link: 'https://google.com',
picture: 'http://google.com/logo.png',
name: 'gamehighscore',
caption: 'I just got a highscore of'+record+'',
description: 'Try to beat my score!.'
};
function callback(response) {
document.getElementById('msg').innerHTML = "Post ID: " + response['post_id'];
}
FB.ui(obj, callback);
}
</script>
該腳本工作正常,當我添加變量記錄失敗我哈特賈南應用IP在那裏,我只是XXXXXX爲張貼。 – Kenp 2012-03-05 02:28:16
沒有工作 – Kenp 2012-03-05 03:13:37
哪個腳本不工作?你確定你在[應用程序面板](https://developers.facebook.com/apps)中寫入了正確的值嗎? – neworld 2012-03-05 10:31:28