发送消息到选定的朋友在facebook


send message to selected friends in facebook

我有以下代码发送消息给选定的朋友自定义

$friends = $facebook->api(array(
            "method"    => "fql.query",
            "query"     => "SELECT uid,name FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me())"
        ));

其中$facebook为具有应用程序详细信息&键值。

,我把我的好友列表放到$friends

我也会有一个文本区来输入要发送的消息,

现在我将传递选定的好友列表&给函数的消息如下

function facebook_send_message(to,message) {
        FB.ui({
            app_id:'MY APP ID',
            method: 'send',
            name: 'Abcdef',
            link: 'http://apps.facebook.com/',
            to:to,
            message:message
        },function(response){alert(response);});
    }

当这个函数被调用时,一个facebook弹出窗口打开,但是我的表单中所有这些内容被提交,我无法将消息发送给所选的朋友,有没有人可以帮助我解决这个问题

对于发送带有自定义文本的消息,您已将'message'参数添加到FB。ui,但此功能已弃用。你不能再预先填充信息了。

这个被弃用可能是因为不良广告。