I'm trying to get an Android app to post highscores to Facebook, similar to how Angry Birds on Facebook does (it get's displayed on Timeline and shows up in the Ticker too). Keep in mind that this game runs only on Android and has no FB Canvas application.
Currently the steps I take for posting the high scores are the following:
- Authenticate the user via FB when login buttons is pressed, request only publish_actions permissions - works
- Request the user id by calling "/me" via FB SDK and saving the id in a variable - works
Send a POST request via Facebook SDK when the users presses "Score 100 points", with the following code: - works (logs true from the call)
Bundle params = new Bundle(); params.putString("score", "100"); // appAccessToken is temporarily a constant facebook.setAccessToken(appAccessToken); String response = "null"; try { response = facebook.request(userId + "/scores", params, "POST"); } catch (IOException e) { e.printStackTrace(); } // Logs true if successful Log.d(TAG, response);
- Open Facebook to see updates from the game, but nothing is displayed anywhere, unlike Angry Birds which shows up on your timeline and shows the highest score - fail (no record of any high scores anywhere
Some more information you may need:
- Category of application is set to Game
- Type of application is set to Web (Native didn't allow me to properly post a new score)
- The user I'm trying with is the owner of the application
- Tried the above steps with both sandbox on and off
- If I call https://graph.facebook.com/USER_ID/scores with the appropriate access_token and user id, I get the previously sent 100 point score as a response, so the score posting seems to work
The question is why doesn't it show up anywhere in the feed/timeline/ticker. Am I missing something?