I am making an application in which I want to fetch the profile pictures of a facebook user. I tried to fetch the albums from facebook but I am getting null response from the facebook server. I have tried it with multiple users but its not working.Can anyone help me?
here is my code:
mAsyncRunner.request(fbuserid+"/albums", new RequestListener()
{
@Override
public void onComplete(String response, Object state)
{
try
{
JSONObject albumjson = Util.parseJson(response);
JSONArray albums = albumjson.getJSONArray("data");
for (int i =0; i < albums.length(); i++)
{
JSONObject album = albums.getJSONObject(i);
String album_name = album.getString("name");
String album_id = album.getString("id");
System.out.println("albumname "+album_name +album_id);
}
}
catch (JSONException e)
{
e.printStackTrace();
}
}
@Override
public void onIOException(IOException e, Object state)
{
}
@Override
public void onFileNotFoundException(FileNotFoundException e,Object state)
{
}
@Override
public void onMalformedURLException(MalformedURLException e,Object state)
{
}
@Override
public void onFacebookError(FacebookError e, Object state)
{
}
});