-1

On android I'm using Facebook SDK 4.0. I want to get all photos of a user logged in via Facebook login.

I have this URL

https://graph.facebook.com/FACEBOOK_ID/albums?access_token=TOKEN

How do I parse and generate images to be viewed in a ListView ?

Gissipi_453
  • 1,250
  • 1
  • 25
  • 61
  • Duplicate of your own previous question, http://stackoverflow.com/questions/31665942/getting-user-photos-using-facebook-login-on-android – CBroe Jul 28 '15 at 08:59

2 Answers2

1

set Bundle for extra parameters like crate a bundle for required parameters ex:

Bundle parameters = new Bundle();
parameters.putString("fields", "id, picture");

Then set it to GraphRequest.

Mandar Pandit
  • 2,171
  • 5
  • 36
  • 58
Gajju
  • 31
  • 1
  • 5
0

you have to used below code to get all photos of user.

/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{user-id}/photos",
    null,
    HttpMethod.GET,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
Darshan Mistry
  • 3,294
  • 1
  • 19
  • 29
  • And can you tell how to parse and load the images in a ListView ? – Gissipi_453 Jul 28 '15 at 06:27
  • 1
    @Gissipi_453 you have to parse json as a simple jsonParsing that we have used for parsing json and for load image you have to used universal image loader – Darshan Mistry Jul 28 '15 at 06:30
  • 1
    Thank you bhai. But can you give an example of a simple jsonParsing ? How do I get image links from the code above ? After I get URLs, I can update the ListView myself. – Gissipi_453 Jul 28 '15 at 06:32