-1

i need to develop a launcher application,i want to get the number of unreadMessage in facebook and show it on the icon of facebook in my launcher desk.then ,how can i achieve my goal?

owean
  • 1
  • the Launcher is an android application!Thank you – owean Nov 07 '14 at 07:13
  • See these http://stackoverflow.com/questions/20216806/how-to-add-a-notification-badge-count-to-application-icon-on-sony-xperia-devices , http://stackoverflow.com/questions/17565307/how-to-display-count-of-notifications-in-app-launcher-icon – Piyush Nov 07 '14 at 07:15

1 Answers1

0

Since FQL is deprecated, the only way would be to read the inbox with the read_mailbox permission and see how many entries with the "unread" flag you get.

One important thing though: read_mailbox needs to get approved by Facebook before you can use it for any user, else it will only work for users with a role in the App (Admin/Dev/Tester). And Facebook will not approved it for Android:

This permission is granted to apps building a Facebook-branded client on platforms where Facebook is not already available. For example, Android and iOS apps will not be approved for this permission. In addition, Web, Desktop and TV apps will not be granted this permission.

Source: https://developers.facebook.com/docs/facebook-login/permissions/v2.2

luschn
  • 68,448
  • 8
  • 104
  • 118