Luis
Luis

Reputation: 130

Is there a way to get people's Facebook liked Pages?

I'm currently developing an app, and I was wandering if there is a way to get a user's Facebook liked pages. I looked intro the Facebook SDK but all I found was Facebook login, sharing, analytics and monetization.

Basically what I want is to access the user's liked Pages so I can make recommendations to the user based on that.

Upvotes: 1

Views: 55

Answers (1)

Yajairo87
Yajairo87

Reputation: 345

Yes, it is possible through the Graph API

According to the official documentation, you should integrate the official Android SDK to your application. The following snippet might solve your needs. Take a look on the GraphResponse object results:

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

Upvotes: 1

Related Questions