我正在开发一个 facebook 应用程序,我正在尝试向我的应用程序用户发送一条私人消息,但是下次弹出窗口会出现并消失,我使用了https://developers.facebook.com/docs/reference/dialogs中的这个脚本/send/,当我在链接上单击 2 到 3 次(在下面指定)然后出现一个弹出窗口,请记住我包括 all.js 和一个 id =“fb-root”的 div 由 facebook
FB.init({
appId: '<?=$this->facebook->getAppID()?>',
xfbml: true,
cookie: true
});
function send_message(user_id) {
FB.ui({
to: user_id,
method: 'send',
name: 'name',
link: 'http://www.something.com'
});
}
链接是,
<a href="" onclick="send_message('<?=user_id?>')">send msg</a>
请提供任何帮助!