有向用户发送应用请求的示例吗?

发布于 2025-01-03 14:38:54 字数 1436 浏览 4 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

鹿! 2025-01-10 14:38:54

我不认为应用程序到用户的请求会给你带来你想要的东西。因为它们只能发送给当前的应用程序用户。

来自:https://developers.facebook.com/docs/requests/

应用程序对用户的请求

应用到用户请求可用于重新吸引用户使用您的应用,并且
只能发送给已安装该应用程序的用户。例如,
通知用户自上次访问以来某些内容发生了变化,
“您的 10 位朋友现在在线”。

应用程序到用户的请求通过 Graph API 发送,了解更多信息
请参阅应用程序文档。应用程序对用户的请求仅适用于
画布应用程序,而不是网站,因为接受请求将引导用户
发送请求的应用程序的 Canvas 页面 URL。通知
应用程序请求的用户

应用程序对用户的请求不会创建通知,尽管它们会创建通知
出现在应用程序和游戏仪表板中并增加应用程序书签
计数器,类似于用户到用户请求。接受应用程序请求

此过程与接受用户到用户的请求相同。

来自 https://developers.facebook.com/docs/reference/api/用户/#apprequests

创建

您可以通过发出 HTTP POST 请求来为用户发布应用请求
使用应用 access_token 到 /USER_ID/apprequests。

注意:POST 到 /USER_ID/apprequests 的 Graph API 端点是
被视为应用程序对用户请求。应用程序生成的请求不
与以下相比,接收通知并获得有限的分发
通过请求对话框发送的用户到用户请求

I don't think app-to-user requests are going to get you what you want. As they can only be sent to current app users.

From: https://developers.facebook.com/docs/requests/

App To User Requests

App to User Requests can be used to re-engage a user in your app and
can only be sent to users that have installed the app. For example,
notifying a user that something has changed since their last visit,
"10 of your friends are now online".

App to User Request are sent via the Graph API, for more information
see the apprequests docs. App to User Requests are only available for
Canvas apps, not websites, as accepting a request will direct the user
to the Canvas Page URL of the app that sent the Request. Notifying
Users of a App Request

App to User Requests do not create notifications, though they do
appear in the App and Games Dashboard and increment an app bookmark
counter, similar to User to User Requests. Accepting an App Request

This process is identical to accepting a User to User Request.

From https://developers.facebook.com/docs/reference/api/user/#apprequests

Create

You can post a apprequest for a user by issuing an HTTP POST request
to /USER_ID/apprequests with the app access_token.

Note: POSTing to the Graph API endpoint of /USER_ID/apprequests is
considered an App to User Request. App-Generated Requests do not
receive notifications and get limited distribution in comparison to
User to User Requests sent with the Request Dialog

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文