0

The documentation of Facebook states:

total_count --> Total number of people who liked. This is only returned when the > flag summary=true is set.

But how do I set such a flag (summary = true) in the following call:

new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{object-id}/likes",
    null,
    HttpMethod.GET,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();

(I want to know which code to use to get the JSON response with the total number of likes, not just what the url with a flag would look like.)

Daverina
  • 21
  • 3
  • Take a look at this answers: http://stackoverflow.com/questions/17755753/how-to-get-likes-count-when-searching-facebook-graph-api-with-search-xxx – JpCrow Jan 22 '16 at 19:31
  • Thanks Jp, but those answers only show urls, how do I use those in Android? – Daverina Jan 22 '16 at 19:41

1 Answers1

3

Replace

/{object-id}/likes

With

/{object-id}/likes?summary=1
Hupfauer
  • 591
  • 1
  • 4
  • 15