Asp.net 无法从我的网站向facebook好友发送邀请?

Asp.net 无法从我的网站向facebook好友发送邀请?,asp.net,facebook,facebook-requests,facebook-invite,Asp.net,Facebook,Facebook Requests,Facebook Invite,我正在使用以下代码向我的facebook好友发送邀请,但它会打开请求弹出窗口,但不会向我的好友发送邀请: <div> <div id="fb-root"> </div> <script src="http://connect.facebook.net/en_US/all.js"> if(top.location!=self.location){ top.location=self.location }

我正在使用以下代码向我的facebook好友发送邀请,但它会打开请求弹出窗口,但不会向我的好友发送邀请:

<div>
    <div id="fb-root">
    </div>
    <script src="http://connect.facebook.net/en_US/all.js">

if(top.location!=self.location){ top.location=self.location }

        FB.init({
            appId: 'my_app_id',
            cookie: true,
            status: true,
            xfbml: true
        });

        function FacebookInviteFriends() {
            FB.ui({
                method: 'apprequests',
                message: '9lessons Programming Blog Topics focused on Web Programming.'
            });
        }
    </script>
    <a href='#' onclick="FacebookInviteFriends();">Facebook Invite Friends</a>
</div>
FB.init({
appId:“我的应用程序id”,
曲奇:是的,
状态:正确,
xfbml:对
});
函数FacebookInviteFriends(){
FB.ui({
方法:“apprequests”,
信息:“9lessons Programming博客主题专注于网络编程。”
});
}
我正在跟踪

请帮帮我。请帮我找出哪里做错了。 这是我的应用程序设置的屏幕截图

我什么都没做,只是“将我的应用程序从沙箱模式中取出”并将页面上传到Live网站上。那里工作得很好。我认为facebook无法从localhost发送邀请。下面是我用来从facebook发送邀请的代码:

 <div id="fb-root">
</div>
<a href="#" onclick="FbRequest('If you want to fulfill your wishes then do not miss the opertuanty, huury up and join WishIsDone, A platform where you can fulfill your as well as your friends wishes...!','609416079110673');">
    Send Request</a>
<script type="text/javascript">
    function FbRequest(message, data) {
        FB.ui({ method: 'apprequests', message: message, data: data, title: 'Share this site with your friends' },
            function (response) {
                // response.request_ids holds an array of user ids that received the request
                var receiverIDs;
                if (response.request) {
                    var receiverIDs = response.to;  // receiverIDs is an array holding all user ids
                    alert(receiverIDs);
                }
            }
    );
    }
    // typical application initialization code for your site
    (function () {
        var e = document.createElement('script');
        e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
        e.async = true;
        document.getElementById('fb-root').appendChild(e);
    } ());
    window.fbAsyncInit = function () {
        FB.init({
            appId: 'app_Id',
            session: {},
            status: true,
            cookie: true,
            xfbml: true
        });
    };
</script>

功能请求(消息、数据){
ui({method:'apprequests',message:message,data:data,title:'Share this site with your friends'},
功能(响应){
//response.request_id保存接收请求的用户id数组
var受体;
if(response.request){
var receiverIDs=response.to;//receiverIDs是一个包含所有用户ID的数组
警报(接收方);
}
}
);
}
//站点的典型应用程序初始化代码
(功能(){
var e=document.createElement('script');
e、 src=document.location.protocol+'//connect.facebook.net/en_US/all.js';
e、 异步=真;
document.getElementById('fb-root').appendChild(e);
} ());
window.fbAsyninit=函数(){
FB.init({
appId:“app_Id”,
会议:{},
状态:正确,
曲奇:是的,
xfbml:对
});
};

就这些,感谢所有回答我问题的人。

你在Facebook上安装了画布应用程序吗?@CBroe我添加了应用程序的屏幕截图将你的应用程序从沙箱模式中取出…