I have an app using the Android Facebook SDK 2.0. I am not able to upgrade this at this time so migrating to SDK 3.0 is not a viable solution.
I'm usting a Facebook instance called fb and have successfully requested and gained permissions. I am able to retrieve a list of albums the user has using the following code:
String json = fb.request("/me/albums");
I successfully get the list and am able to construct an array of objects containing only the data I need.
What I'm trying to accomplish is downloading the cover photo so that I can display this to the user. I have tried making a raw http request to https://graph.facebook.com/me/picture/<picture id>?type=square&access_token=<access token given by fb.getAccessToken()>
. When I make the request I get a 400 response code (invalid request). I thought this had something to do with Facebook redirecting away to akamai for the actual image and updated the code to make a second graph request through the Facebook class.
I am now making the request fb.request("/me/picture/<picture id>?redirect=false")
to get the json data containing the akamai url. I get a message that I must provide an access token, so I added &access_token=<access token given by fb.getAccessToken()>
and receive an error that the access token is malformed.
I know for certain that the user is not logged out between these requests so there should be no issue there.
I must be doing something wrong but I don't see what it is.