thank you for your time and help.
I am trying to get all the profile pictures of the current user , but I am getting a weird answer :
{Response: responseCode:200, graphObject: GraphObject{graphObjectClass=GraphObject, state={"data":[]}}, error: null, isFromCache: false}
I have already made the authentification and loaded some other informations successfully.
I have already checked some other similar questions/answers and I didn't find anyone working with fql and the new API of facebook.
The permissions are defined like this:
/**
* the list of permissions of facebook
* */
private static final List<String> FACEBOOK_PERMISSION_LIST = Arrays.asList(
"user_photos", "email", "user_birthday", "basic_info");
The code
String fqlQuery = "SELECT src_big FROM photo WHERE album_object_id IN (SELECT object_id FROM album WHERE owner = me() AND name='Profile Pictrue' AND type='profile' )";
Bundle params = new Bundle();
params.putString("q", fqlQuery);
Session session = Session.getActiveSession();
Request request = new Request(session, "/fql",
params, HttpMethod.GET,
new Request.Callback() {
public void onCompleted(
Response response) {
Log.i(TAG, "Got results: "
+ response.toString());
}
});
Request.executeBatchAsync(request);
I hope you can help me, every suggestion is welcome.
There's a typo in
name='Profile Pictrue'; it'sname='Profile Pictures'(But the thing is that you dont need to check for this
name,type=profileis just enough.)So your final query should be:
or better (because it was not possible to query by type for me):
And adding some parameters to the request, which will look like this: