有哪些可用功能可以向 Facebook 用户发送通知?
目前,我正在将 Codeplex 的 Facebook Developer Toolkit 版本 2 用于我的 ASP.net Facebook 应用程序。 我希望能够向用户的收件箱或应用程序墙发送通知,并且想知道有哪些可用的功能可以做到这一点? 如果 API 中没有,请提供 Facebook 主库中的示例函数。 这将有很大帮助。 谢谢!
Currently I am using Codeplex's Facebook Developer Toolkit version 2 for my ASP.net Facebook application. I would like to be able to send notifications to a user's Inbox or wall of the application and was wondering what are the available functions to do that? If not in the API, then please provide example functions from the main Facebook library. This will help immensely. Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
经过简短的搜索后,我找到了使用该工具包发送通知的示例:
(来自:http://facebooktoolkit.codeplex.com/Thread/View.aspx ?ThreadId=49876)
在查看 Codeplex 源代码后,很明显这会发送用户到用户的通知,因此需要发送者的活动用户会话。
Codeplex 似乎不支持不需要会话的应用程序到用户的通知,但添加此功能将很简单。 向 send 方法添加类型变量,并根据此处的 API 文档进行相应设置: http://wiki.developers.facebook.com/index.php/Notifications.send
Codeplex开发者工具包中notifications.send方法的源代码在这里:
http://facebooktoolkit.codeplex.com/SourceControl/changeset/view/28656# 233852
请记住,Codeplex 开发人员工具包源代码已超过 3 个月没有更新。 这意味着它不支持许多新的 Facebook API 功能和更改。 您可能需要浏览客户端库 wiki 页面以查找更新的库: http://wiki.developers.facebook.com/index.php/Client_Libraries
After a brief search I found an example of sending notifications using the toolkit:
(from: http://facebooktoolkit.codeplex.com/Thread/View.aspx?ThreadId=49876)
After looking through the Codeplex source it's clear that this sends a user-to-user notification, and therefore requires an active user session of the sender.
Codeplex does not appear to support app-to-user notifications which do not require a session, but adding this feature would be trivial. Add a type variable to the send method and set it accordingly based on the API documentation here: http://wiki.developers.facebook.com/index.php/Notifications.send
The source code for the notifications.send method in the Codeplex Developer Toolkit is here:
http://facebooktoolkit.codeplex.com/SourceControl/changeset/view/28656#233852
Please keep in mind that the Codeplex developer toolkit source code has not been updated in over 3 months. This means that it does not support many new Facebook API features and changes. You may want to browse the client library wiki page to find a library that is more up to date: http://wiki.developers.facebook.com/index.php/Client_Libraries