使用Javascript-SDK的Facebook画布应用程序

使用Javascript-SDK的Facebook画布应用程序,javascript,facebook,sdk,oauth,Javascript,Facebook,Sdk,Oauth,希望有人能帮我。我有一个facebook画布应用程序。我正在使用这个代码进行身份验证 window.fbAsyncInit = function() { FB.init({ appId: '123842974364777', status: true, cookie: true, xfbml: true, oauth: true}); this.vars = { access_tok

希望有人能帮我。我有一个facebook画布应用程序。我正在使用这个代码进行身份验证

window.fbAsyncInit = function() {
    FB.init({ appId: '123842974364777',
        status: true,
        cookie: true,
        xfbml: true,
        oauth: true});

        this.vars = {
            access_token: '',
            album_id: '',
            items: '',
            user_id: '',
            photo_path: '',
            errorHandler: 'There was a problem posting your picture!<br> Please contact <a href="mailto:support@eshots.com">support@eshots.com</a>',
            counter: 1
        }

    authenticate();

    function authenticate() {

        FB.getLoginStatus(function(response) {
            if(response.authResponse) {
                // logged and known to app
                // store access token
                vars.access_token = response.authResponse.accessToken;
                sendUserInformation();
            } else {
                // not logged in or unknow to app
                // prompt user to authorize app
                FB.login(function(response) {
                    if(response.authResponse) {
                        // store access token
                        vars.access_token = response.authResponse.accessToken
                        sendUserInformation();
                    }
                }, {scope: 'email,read_stream,user_birthday,user_photos,publish_stream'});          
            }
        });
    } 

};
(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);
}());
我的问题是,运行此代码不会在facebook iframe中显示我的页面。它只是停留在web域上。我需要的是在facebook iframe中显示此页面

要实现这一点,我需要补充什么


感谢您的帮助

您是否已在开发者应用程序中设置画布url/安全url以指向画布代码

这基本上应该指向您的域,就像画布文件夹中有您想要显示的索引页一样


您应该能够在没有任何其他配置或FB内容的情况下查看基本页面。

Hi Dustin!是的,一切都准备好了!如果您直接访问为facebook设置配置的链接,您会得到响应吗?您正在使用的代码应该通过iframe工作,或者直接通过您的网站访问。