The thing is, I try to print a picture of his chosen person, his avatar, I found on the Internet full of examples, but none of them display the picture, in theory I need to cache the picture on the device. Maybe someone has worked with this api and can tell me - maybe there are some elements in this api that display photos from the link or for example something else. Since the photo comes in the json format, you need to parse it, then you didn’t get the link problem, but how to display it further in the image view or in another view I have no idea who has any ideas?

UPDATE: I listened to Roman, tried to use the lib that is on his link, but I get a lot of errors when using.

02-28 18:55:21.567: E/AndroidRuntime(10067): FATAL EXCEPTION: main 02-28 18:55:21.567: E/AndroidRuntime(10067): java.lang.NoClassDefFoundError: com.nostra13.universalimageloader.core.ImageLoader 02-28 18:55:21.567: E/AndroidRuntime(10067): at com.example.testproject.FriendOpenProfile.<init>(FriendOpenProfile.java:32) 02-28 18:55:21.567: E/AndroidRuntime(10067): at java.lang.Class.newInstanceImpl(Native Method) 02-28 18:55:21.567: E/AndroidRuntime(10067): at java.lang.Class.newInstance(Class.java:1319) 02-28 18:55:21.567: E/AndroidRuntime(10067): at android.app.Instrumentation.newActivity(Instrumentation.java:1023) 02-28 18:55:21.567: E/AndroidRuntime(10067): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1871) 02-28 18:55:21.567: E/AndroidRuntime(10067): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981) 02-28 18:55:21.567: E/AndroidRuntime(10067): at android.app.ActivityThread.access$600(ActivityThread.java:123) 02-28 18:55:21.567: E/AndroidRuntime(10067): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147) 02-28 18:55:21.567: E/AndroidRuntime(10067): at android.os.Handler.dispatchMessage(Handler.java:99) 02-28 18:55:21.567: E/AndroidRuntime(10067): at android.os.Looper.loop(Looper.java:137) 02-28 18:55:21.567: E/AndroidRuntime(10067): at android.app.ActivityThread.main(ActivityThread.java:4424) 02-28 18:55:21.567: E/AndroidRuntime(10067): at java.lang.reflect.Method.invokeNative(Native Method) 02-28 18:55:21.567: E/AndroidRuntime(10067): at java.lang.reflect.Method.invoke(Method.java:511) 02-28 18:55:21.567: E/AndroidRuntime(10067): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784) 02-28 18:55:21.567: E/AndroidRuntime(10067): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) 02-28 18:55:21.567: E/AndroidRuntime(10067): at dalvik.system.NativeStart.main(Native Method) 

I suspect that it doesn’t work with facebook api, because if a project without a facebook api then everything is downloaded normally and shown. Can anyone come across?

    2 answers 2

    Here is the answer to all your questions.

    • I was already there, a very cumbersome library, I thought something easier to find ... - dajver
    • Well, then the only option is your own bike. although the library is cool - Roman Zakharov
    • that you can’t argue with what you need, but damn it is heavy ... all the more for the withdrawal of one photo it doesn’t seem like a cannon - dajver
    • Conflicts with Facebook api, how I connect it is not imported, when I import it forcibly - does the build path give an error while not being downloaded? - dajver

    in php I did this:

     //После валидации $graph_url = "https://graph.facebook.com/me?access_token=" . $_SESSION['fb_token']; $user = json_decode(file_get_contents($graph_url)); //если айди пользователя известна то можно так $avatar = 'https://graph.facebook.com/'.$user->id.'/picture'; echo '<img src="'.$avatar.'"/>'; 
    • the one that pkhp is to me) in php can be displayed just like that link, and in the droid you need to pull it off to the phone first, and then pull out the current - dajver