BamsBamx BamsBamx - 1 year ago 90
Android Question

Android - Get profile cover picture from Facebook

I am using Facebook SDK and Parse SDK and I want to retrieve the profile cover picture.

I am doing the following:

new Request(
new Request.Callback() {
public void onCompleted(Response response) {"TAG",

But I am not able to get the proper response since it says I need an access token (the user has already been logged in).

responseCode: 400,
graphObject: null,
error: {
HttpStatus: 400,
errorCode: 2500,
errorType: OAuthException,
errorMessage: An active access token must be used to query information about the current user.

Is there any fix for this available?

Answer Source

After spending A LOT of hours searching for the answer, I finally got it !!!

The Android SDK for Facebook docs, are too useless.

To solve this problem we just need to set the Graph Path in the second param and a Bundle with fields as third param. Example:

Bundle params = new Bundle();
            params.putString("fields", "cover");
            new Request(ParseFacebookUtils.getSession(),
                    new Request.Callback() {
                        public void onCompleted(Response response) {

Then we can parse the response object returned in onCompleted as JSON with


Source: New Facebook SDK and OAuthException in Graphpath requests thanks to @Jesse Chen

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download