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:
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);
Some more information you may need:
The question is why doesn't it show up anywhere in the feed/timeline/ticker. Am I missing something?
According to the documentation and the official tutorial, you're published your scores properly. So, enter our next question: why isn't it showing up on your user's Ticker or Timeline?
The answer is, the means with which games like Angry Birds publish high scores is actually blended between the score mechanism and posting directly to a user's stream. Facebook controls the story types and distribution under which scores will be published, so your app isn't guaranteed to generate a new story item every time you post a score to the site. Quoting a primary source:
Facebook says the stories that get the most clicks, likes, and comments will get more distribution in News Feed and on Timeline.
Fortunately, you have a recourse if the user allows it. If you believe your user cares very much about having their high scores published, you can ask for permission to post to their stream directly and do so with your own custom messages. More information can be found here.
(Additional reference)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With