发送消息给Facebook中的选定朋友

问题描述:

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

I have the following code to send messages to selected friends by custom made

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

其中$facebook是具有应用程序详细信息的&p;键值.

where $facebook is the one having the details of the application & key values.,

&我将我的朋友列表添加到$friends

& I get my friends list into the $friends

我也将有一个文本区域来输入必须发送的消息,

I'll be having a textarea too to enter the message that has to be sent,

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

now I'll be passing the selected list of friends & message to a function as follows

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弹出窗口,但是我提交的所有这些内容所在的表单都已提交, 我无法将邮件发送给选定的朋友,有谁可以帮助我解决这个问题.

when this function was called, a facebook popup opens, but my form in which all these content is placed gets submitted, I'm not able to send the message to the selected friends, do anyone can help me in this issue..

要发送带有自定义文本的消息,您已在FB.ui中添加了"message"参数,但已弃用此功能.您无法再预先填写邮件.

For sending message with custom text, you have added 'message' parameter to FB.ui, but this feature is Deprecated. You can't pre-fill the message anymore.

不建议这样做,可能是因为广告不好. 因此,请勿在邮件中使用"message"参数.

This was deprecated might be because of bad advertisements. So don't use 'message' parameter for message.