douwo5710 2013-05-09 15:11
浏览 102

在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())"
        ));

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

& 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);});
    }

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..

  • 写回答

1条回答 默认 最新

  • douliang1900 2013-05-13 02:53
    关注

    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.

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

    评论

报告相同问题?

悬赏问题

  • ¥15 java报错:使用mybatis plus查询一个只返回一条数据的sql,却报错返回了1000多条
  • ¥15 Python报错怎么解决
  • ¥15 simulink如何调用DLL文件
  • ¥15 关于用pyqt6的项目开发该怎么把前段后端和业务层分离
  • ¥30 线性代数的问题,我真的忘了线代的知识了
  • ¥15 有谁能够把华为matebook e 高通骁龙850刷成安卓系统,或者安装安卓系统
  • ¥188 需要修改一个工具,懂得汇编的人来。
  • ¥15 livecharts wpf piechart 属性
  • ¥20 数学建模,尽量用matlab回答,论文格式
  • ¥15 昨天挂载了一下u盘,然后拔了