通过Facebook API发送私人信息 [英] Sending private messages through Facebook API

查看:211
本文介绍了通过Facebook API发送私人信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:结果
  <一href=\"http://stackoverflow.com/questions/2574431/facebook-api-send-private-messages-to-friends\">Facebook API - 发私信给朋友

我知道这是没有正式有可能通过FB API发送私人消息。在SO每一个线程是这么说的也是。但我是使用RockMelt的浏览器,当你邀请别人的私人信息被发送给他们。意味着可以通过API发送私人消息。更重要的是,Facebook是好它。

I know that it is not officially possible to send private messages through FB API. Every thread in SO says so too. But I was using RockMelt browser and when you invite somebody, a private message is sent to them. Means it is possible to send private messages through API. More importantly, Facebook is okay with it.

这是他们如何使用它的任何猜测?它是使用套接字一些HTTP POST把戏?顺便说一句,我们要使用此功能,只有在用户发起的操作。

Any guesses on how they are using it? Is it some HTTP POST trick using sockets? BTW, we are going to use this feature only on user initiated actions.

推荐答案

这是成为可能。
火发送消息(Facebook的对象初始化应做之前),此方法。

This is now possible. Fire this method for sending message(initialization of facebook object should be done before).

到:Facebook的用户ID

to:user id of facebook

function facebook_send_message(to) {
    FB.ui({
        app_id:'xxxxxxxx',
        method: 'send',
        name: "sdfds jj jjjsdj j j ",
        link: 'https://apps.facebook.com/xxxxxxxaxsa',
        to:to,
        description:'sasa d d dssd ds sd s s s '

    });
}

属性


  • APP_ID结果
    您的应用程序的标识符。必需的,但指定的自动
    大多数的SDK。

  • app_id
    Your application's identifier. Required, but automatically specified by most SDKs.

REDIRECT_URI结果
该URL重定向到用户点击发送后或取消
该对话框上的按钮。必需的,但大多数自动指定
软件开发工具包。

redirect_uri
The URL to redirect to after the user clicks the Send or Cancel buttons on the dialog. Required, but automatically specified by most SDKs.

显示结果
显示模式,其中呈现的对话框。这是自动
大多数的SDK规定。

display
The display mode in which to render the dialog. This is automatically specified by most SDKs.

要结果
用户ID或用户名要发送消息。一旦对话
出现,用户可以指定其他用户,Facebook的群组和
电子邮件地址要向其发送消息。将内容发送到一个
Facebook的集团将其发布到组的墙上。

to
A user ID or username to which to send the message. Once the dialog comes up, the user can specify additional users, Facebook groups, and email addresses to which to send the message. Sending content to a Facebook group will post it to the group's wall.

链接结果
(必需)链接到邮件中发送。

link
(required) The link to send in the message.

图片宜配网
默认情况下画面会从指定的链接服用。该网址
一个图象的,以包括在消息中。图片将显示
旁边的链接。

picture
By default a picture will be taken from the link specified. The URL of a picture to include in the message. The picture will be shown next to the link.

名称
默认情况下标题会从指定的链接服用。的名称
该链接,即要显示的文字,用户会点击。

name By default a title will be taken from the link specified. The name of the link, i.e. the text to display that the user will click on.

描述结果
默认情况下,将描述从指定的链接作出。
描述性文字显示下面的链接。

description
By default a description will be taken from the link specified. Descriptive text to show below the link.

这篇关于通过Facebook API发送私人信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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