title: Facebook Scores in Android Studio
body: <p>I'm wondering on how to save and the get back the score in Facebook sdk (Android). They explained it in few words but I don't understand nothing from that :S. How to ask and then handle the result with score? This is my code for it:</p>
  
  <h2>Getting the score</h2>
  
  <pre><code>Bundle param = new Bundle();
  param.putInt("score", myScore);
  
  accessToken = AccessToken.getCurrentAccessToken();
  new GraphRequest(
          accessToken,
          "/me/scores",
          param,
          HttpMethod.POST,
          new GraphRequest.Callback() {
              public void onCompleted(GraphResponse response) {
              }
          }
  ).executeAsync();
  </code></pre>
  
  <h2>Setting the score</h2>
  
  <pre><code>accessToken = AccessToken.getCurrentAccessToken();
  new GraphRequest(
          accessToken,
          "/me/scores",
          null,
          HttpMethod.GET,
          new GraphRequest.Callback() {
              public void onCompleted(GraphResponse response) {
                  try {
                      fbTotalScore = response.getJSONObject().getInt("score");
                  } catch (JSONException e) {
                      e.printStackTrace();
                  }
                  tvTotalPushUps.setText(String.valueOf(fbTotalScore));
              }
          }
  ).executeAsync();
  </code></pre>