发送出现在Facebook主页左边列的应用程序请求? [英] Sending application requests that appear in the left column on Facebook home page?

查看:118
本文介绍了发送出现在Facebook主页左边列的应用程序请求?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Facebook主页的左栏,Facebook应用程式的通知会显示为灰色,例如APPLICATION NAME [1]。

At the left column on facebook's home page, a notification from Facebook applications appears with a gray character, for example, "APPLICATION NAME [1]".

例如,当一个朋友回答了我的问题时,Badoo的应用程式会显示这类通知。

For example, Badoo app displays this type of notification when a friend has answered my question.

如何显示此通知给我自己的应用程序?

How do I display this notification for my own application?

推荐答案

你的英文很好,hkweb。要向用户发送通知,您必须向用户的 / apprequests发送POST请求连接。您需要为用户提供有效的 access_token ,并且此用户必须已经安装您的应用程序,然后才能向其发送这样的通知,或使用请求对话框。之后,发送邮件就如此简单:

Your English is great, hkweb. To send the user a "Notification", you must send a POST request to the user's /apprequests connection. You'll need a valid access_token for the user and this user must have "installed" your application before you can send them notifications like this OR use the Requests Dialog. Afterwards, it's as simple as sending a POST to:

https://graph.facebook.com/{USER_ID}/apprequests?access_token={ACCESS_TOKEN}

https://graph.facebook.com/me/apprequests?access_token={ACCESS_TOKEN}

发送唯一必需的参数是消息,但您也可以在data参数中发送JSON编码参数字典。我建议你玩 API Graph Explorer 。在那里,您可以使用POST发送自己的应用请求,使用GET检查您的待处理请求,并使用DELETE请求清除待处理请求

The only required parameter to be sent is "message", but you can also send a JSON-encoded dictionary of parameters in the "data" parameter. I recommend you play with the API Graph Explorer. There you can send yourself apprequests with a POST, check your pending ones with a GET and clear pending requests with a DELETE request to

https://graph.facebook.com/{ID_OF_REQUEST_OBJECT}

如果您正在开发应用程序在Facebook上(如画布应用程序),您可以使用请求对话框,这使得发送POST非常简单,并为您提供一个朋友选择器。

If you're developing an application on Facebook (like a canvas app), you can make use of the Requests Dialog which makes sending the POST very easy and gives you a friend selector as well.

您还可以通过发送GET获取用户的待处理请求请求同一个对象。

You can also get the user's pending apprequests by sending a GET request to the same object.

这篇关于发送出现在Facebook主页左边列的应用程序请求?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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