开发者

Find amount of notifications through the facebook api

开发者 https://www.devze.com 2023-04-04 20:08 出处:网络
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.summar

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

精彩评论

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

关注公众号