I want to make a facebook leaderboard, so I need to use the graph API for score. I have no problem to read the player's score. What is the best way to update the score of the player when his score changes ? At the moment, everytime the score changes I :
- read the current score with the graph API
- increase the score (for example +1 point if the player wins)
- update the score with the graph API
My issue is that I don't know how to get the publish_actions permission when the user logs in. I need it to update the score with the facebook graph API.
Here is my code :
AuthUI.IdpConfig facebookIdp = new AuthUI.IdpConfig.Builder(AuthUI.FACEBOOK_PROVIDER)
The problem is that .setPermissions(Arrays.asList("user_friends", "publish_actions")) do not gives me the publish_permission. It says "Cannot pass a publish or manage permission (publish_actions) to a request for read authorization".
So I understand that .setPermission works for read permissions only. How can I get the publish_actions permission for my Android app using FirebaseUI ?