-1
我正在使用JavaScript SDK以允許用戶登錄Facebook,檢索他們的朋友個人資料圖片,然後最終在登錄的用戶牆上發佈消息。問題是,當用戶必須授權應用程序時,我總是收到一個錯誤,「從Pencils of Promise加載頁面時出錯」。無法通過Facebook登錄API
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script>
FB.init({appId: '154058871279888', status: true, cookie: true,
xfbml: true});
console.log(FB.getLoginStatus());
$('div.voice-btn:eq(0)').click(function() {
FB.login(function(response) {
if(response.session) {
FB.api('/me', function(data) {
console.log(data);
});
donateVoiceSlider();
}
});
});
$('#voice-step-2-btn').click(function() {
var body = 'Test Facebook post';
FB.api('/me/feed', 'post', { body: body }, function(response) {
if (!response || response.error) {
alert('Error occured');
} else {
alert('Post ID: ' + response);
}
});
});
// Donate Voice Content Slider
function donateVoiceSlider() {
var $ul = $('#donatevoice');
var cur_left = parseInt($ul.css('left'));
var li_width = 980;
$ul.animate({'left': cur_left-li_width+'px'});
}
</script>
請幫忙!
那麼爲什麼我得到-1? – John 2010-11-02 15:53:59