2012-10-10 66 views
1

我爲了送崗位到基於本教程 https://developers.facebook.com/docs/guides/games/custom-muti-friend-selector/Facebook的飼料對話框不打開

我已經能夠加載我的好友列表,並創建一個在Facebook上朋友的牆壁建立一個自定義的多的朋友選擇我想發佈的CSV列表,但打開Feed對話框的最後一步失敗,我不明白爲什麼。該對話框不會打開。

這是我的sendRequest將功能

var sendUIDs = ''; 
    $('.cbFriendId').each(function(index){ 
     if($(this).prop('checked') == true){ 
     var addId = $(this).attr('value'); 
     sendUIDs += addId + ','; 
     } 
    }); 
    console.log(sendUIDs); 
    openSendDialog(sendUIDs); 
    } 


    function openSendDialog(sendUIDs){ 
    console.log('open send dialog'); 
    FB.ui({ 
     method: 'feed', 
     to: sendUIDs, 
     link: 'http://www.mydomain.com', 
     display: 'iframe', 
     message: 'Hello from My Domain', 
     name: 'Click to view my app', 
     caption: 'Hello my app' 

    }, 
       function (response) { 
        if (response) { 
         alert('Post was published.'); 
         console.log('Post was published.'); 
        } else { 
         alert('Post was not published.'); 
         console.log('Post was not published.'); 
        } 
       } 
      ); 
} 

最後控制檯日誌條目是「開放式發送對話」。我在IE9開發工具中沒有遇到任何錯誤,但我在Chrome中收到了'不安全的Javascript嘗試訪問框架...'錯誤。

只是爲了理智這裏是初始化

window.fbAsyncInit = function() { 
    FB.init({ 
     appId: '462750593765445', // App ID 
     channelUrl: '//www.mydomain.com/channel.html', // Channel File 
     status: true, // check login status 
     cookie: true, // enable cookies to allow the server to access the session 
     xfbml: true, // parse XFBML 
     frictionlessRequests: false 
    }); 
}; 

而且我應該提到的是,應用程序在沙盒模式圖表中的數據。

感謝您的幫助

+0

我要指出,我能得到彈出的應用程序認證和權限開火。 –

回答

相關問題