简体   繁体   English

如何使用 Facebook 的 SDK 为即时游戏发送通知?

[英]How to send notifications using Facebook's SDK for instant games?

I've been working on an instant game for Facebook.我一直在为 Facebook 开发即时游戏。 All I want is to send a notification that invites the user to play again.我想要的只是发送邀请用户再次播放的通知。 I've been checking out documentation for it but it is very unclear on that matter.我一直在检查它的文档,但在这方面还不清楚。

I am already using the SDK for instant games and got it running, but I have no idea on how to use the graph API to only send a notification.我已经将 SDK 用于即时游戏并使其运行,但我不知道如何使用图形 API 仅发送通知。 I don't know in which file I have to put the code for it, nor where to reference it in the index.我不知道我必须将代码放在哪个文件中,也不知道在 index.html 中引用它的位置。

you need to add a messenger bot to be able to message users.您需要添加一个信使机器人才能向用户发送消息。 check this is the bot docs [1]: https://developers.facebook.com/docs/games/instant-games/getting-started/bot-setup/检查这是机器人文档 [1]: https : //developers.facebook.com/docs/games/instant-games/getting-started/bot-setup/

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM