how to download Facebook profile picture

后端 未结 1 1309
暖寄归人
暖寄归人 2021-01-22 08:20

In my android application, user can logging in using facebook/twitter.

https://graph.facebook.com/username/picture 

https://api.twitter.com/1/users/profile_imag         


        
相关标签:
1条回答
  • 2021-01-22 08:29

    Use an AsyncTask to download it and save it to your app's disk space. In your database, just store the file path of the picture (I would save it with the filename being the FB user id).

    You can see how to use an AsyncTask to do a web connection in my code at github. https://github.com/nedwidek/Android-Rest-API

    I'd need to switch workspaces to get to code that works with the local storage.

    0 讨论(0)
提交回复
热议问题