向多个Facebook用户发送消息

时间:2013-12-12 05:52:41

标签: php facebook facebook-graph-api reference

有没有办法实现这个目标?

此代码用于发送消息,但会弹出一个框,您可以在其中键入消息 然后发送。

   FB.ui({
                      method: 'send',
                      to: '100007250800729',
                      link:'http://www.mysite.com',
                      redirect_url:location.href,
                      message: 'A request especially for one person.',
                      data: 'tracking information for the user'

                    });

有没有一种方法可以通过执行脚本立即发送它而不会弹出这样的内容,这样我就可以将消息发送给多个用户

foreach(users as user) {
    method: 'send',
    to: user->id,
    link:'http://www.mysite.com',
    redirect_url:location.href,
    message: 'HEllo '.user->name.' A request especially for you.',
    data: 'tracking information for the user' 
} 

1 个答案:

答案 0 :(得分:0)

没有弹出窗口就无法发送消息。还有一件事,你不能写预定义的消息。 示例: -

FB.ui({                       方法:'发送',                       至:100007250800729                       链接: 'http://www.mysite.com',                       REDIRECT_URL:location.href                     });

相关问题