发送消息给Facebook中的选定朋友 [英] send message to selected friends in facebook

查看:149
本文介绍了发送消息给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.

这篇关于发送消息给Facebook中的选定朋友的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆