How can you send the exact number of notification (the number next to your apps) to facebook instead of each time we make a request?

StackOverflow https://stackoverflow.com/questions/7575766

Question

I'm trying to have more control on the number we have next to our apps for the user, How can we just send the exact number to show instead of sending notification that increment that number each time.

Basically the current behavior is : Friend ask for something or give me a gift it increase the number If another friend send me something its increase the number. When I log to the game all the counter is reset.

Wanted behavior : When I log to the game and i go see only one friend on the counter for this friend is reset.

We are currently using facebook-java-api but we will probably merge to restfb soon. But if you know how to do it in any language it will probably help.

Était-ce utile?

La solution

The old dashboard api support the set_count method that can reset to 0 or put the value you want for your apps.

See http://developers.facebook.com/docs/reference/rest/dashboard.setCount/

However the facebook-java-api don't support setCount but the newer restFB does so we need to update our apps to the new api.

EDIT: Note that you and extend the BasicClient and create a custom IFacebook Method with facebook-java-api it`s not clean but it do the trick utils we upgrade to a new facebook api.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top