开发者

Find amount of notifications through the facebook api

How would I be able to find out how many notifications I have through the facebook开发者_Go百科 php api? For example, how many unread messages + global notifications + unanswered friend requests.


summary.unseen_count in /me/notifications

summary.unread_count and summary.total_count in /me/friendrequests

I expect a similar summary.<something>_count field to exist for messages, but haven't tested.


Prompt the user for manage_notifications permission and call /me/notifications and count them up. You could also run a FQL query on the notifications table but FQL doesn't support count so you would have to loop through all the records to sum them up as well.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜