What code to use to insert the result into an Imageview?

Asked

Viewed 38 times

0

I’m trying to create a timeline where the images of a facebook album appear, I’m not getting the images to appear in my Activity. I would like to get a code to use where it appears Insert your code here. Someone knows a solution?

final GraphRequest request = GraphRequest.newGraphPathRequest(
            accessToken,
            "/id",
            new GraphRequest.Callback() {
                @Override
                public void onCompleted(GraphResponse response) {                        

                    // Insert your code here
                }
            });

    Bundle parameters = new Bundle();
    parameters.putString("fields", "albums{photos{from}}");
    request.setParameters(parameters);
    request.executeAsync();
  • 1

    Use the Picasso library, this post can help you http://stackoverflow.com/questions/24273783/android-picasso-library-how-to-add-authentication-headers

  • I was able to upload an image using the Picasso library, but I could not implement the code used in this post you sent me, it must be due to lack of knowledge, because I am beginner in this area. For my project I need to upload several images from a facebook page. I’m wanting to upload the images as it happens on Instagram, when opening the screen the images of the page are loaded. Anyway thanks for the help

1 answer

1

Use the lib Glide she is recommended by google:

It has a simple syntax

Glide.with(context).load("url").into(imageView);

To add lib to your dependencies add to Gradle:

compile 'com.github.bumptech.glide:glide:3.7.0'
  • Just like the Picasso library and Glide’s worked well when loading an image, but for my project I need to upload several images from a facebook page. I want to upload the images as it happens on Instagram, when opening the screen the images of the page are loaded. Thanks for the help

Browser other questions tagged

You are not signed in. Login or sign up in order to post.