简体   繁体   English

我可以使用Facebook Graph API v2.4使用ID向朋友发送消息吗?

[英]Can I send a message to a friend using the id, using using Facebook Graph API v2.4?

I need your help! 我需要你的帮助!

I have friend list received from "/me/taggable_friends" like this: 我收到了来自“ / me / taggable_friends”的朋友列表,如下所示:

Array
    (
        [id] => AaL-5tuNqmauktZphAAI3V1oMW...
        [name] => Name Surname
        [picture] => Array
            (
                [is_silhouette] => 
                [url] => https://fbcdn-profile...5101399123_n.jpg
            )
    )

Can I send a message to a friend using the this TokenID (I can`t)? 我可以使用此TokenID向我的朋友发送消息吗?

I use: 我用:

FB.ui({
            method: 'send',
            link: {url},
            to: id
        }

Is there any other way to send a message to a friend? 还有其他发送消息给朋友的方式吗?

Is it possible to get real friend`s profile id? 是否可以获取真实朋友的个人资料ID?

also: https://www.facebook.com/groups/fbdevelopers/permalink/945186472191534/ 还: https : //www.facebook.com/groups/fbdevelopers/permalink/945186472191534/

You could open the Send Dialog in a popup. 您可以在弹出窗口中打开“ 发送对话框”

 $parameters = array(
    'app_id' => $facebook->getAppId(),
    'to' => $facebookUserId,
    'link' => 'http://google.nl/',
    'redirect_uri' => 'http://my.app.url/callback'
 );
 $url = 'http://www.facebook.com/dialog/send?'.http_build_query($parameters);
 echo '<script type="text/javascript">window.open('.json_encode($url).', ...

For detailed options see: https://developers.facebook.com/docs/reference/dialogs/send/ 有关详细选项,请参见: https : //developers.facebook.com/docs/reference/dialogs/send/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用graph API v2.4及更高版本获取Facebook新闻提要 - Get facebook news feed using graph api v2.4 and above 在 FaceBook Graph API v2.4 中,如何在 JSON 提要中包含帖子的图片/图标? - In FaceBook Graph API v2.4, how can I include pictures/icons of the posts in the JSON feed? 如何使用 Accessstoken 通过图形 API 向 Facebook 好友发送消息 - how send message facebook friend through graph api using Accessstoken 使用Facebook iOS SDK API v2.4获取Facebook登录用户的兴趣 - Fetch Facebook logged-in user's Interest using Facebook iOS SDK API v2.4 使用javascript sdk api v2.4从Facebook提取“电子邮件”时出现问题 - Problems fetching 'email' from Facebook using javascript sdk api v2.4 无法在iOS中使用具有自定义按钮的api v2.4登录到Facebook - Not able to login with facebook using api v2.4 with custom button in ios Facebook API图形v2.4获取简单数据 - Facebook api graph v2.4 get simple data 如何使用Facebook ID将Facebook消息发送给朋友? - How to send Facebook message to friend using Facebook ID? 无法使用asp.net C#编码从facebook api v2.4获取用户电子邮件 - unable to get user email from facebook api v2.4 using asp.net c# coding 如何使用iOS facebook-graph-api将自定义消息发送给一个朋友? - How to send custom message to one friend using iOS facebook-graph-api?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM