发送私人讯息给朋友 [英] Send private messages to friends

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

问题描述

我需要通过Facebook连接用户的信息,并向所有的朋友发送私人消息。是否可能?

I need to get via Facebook connect user's info and send a private message to all of his friends. Is it possible?

推荐答案

现在可以通过api发送私人消息。

Sending private message through api is now possible.

启动此事件发送消息(Facebook对象的初始化应该在之前完成)。

Fire this event for sending message(initialization of facebook object should be done before).

to:user id的脸书

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:'sdf sdf sfddsfdd s d  fsf s '

    });
}

属性


  • app_id

    您的应用程序的标识符。大部分SDK都自动指定

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

redirect_uri

用户点击发送后重定向到的URL或取消
按钮。大部分
SDK都必须自动指定。

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.



发送邮件的用户标识或用户名。一旦对话框
出现,用户可以指定发送消息的其他用户,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.

图片

默认情况下,将从指定的链接中获取照片。要包含在消息中的图片的URL
。该图片将在链接旁显示

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.

查看更多 here

@VishwaKumar:

@VishwaKumar:

要发送带有自定义文本的消息,您必须在 FB.ui 中添加message参数,但我认为此功能已被弃用。你不能预先填写消息了。

For sending message with custom text, you have to add 'message' parameter to FB.ui, but I think this feature is deprecated. You can't pre-fill the message anymore. Though try once.

FB.ui({
  method: 'send',
  to: '1234',
  message: 'A request especially for one person.',
  data: 'tracking information for the user'
});

查看此链接: http://fbdevwiki.com/wiki/FB.ui

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

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