如何下载Facebook的个人资料图片如何下载、个人资料、图片、Facebook

由网友(你动劳资女人我挖你家祖坟)分享简介:在我的Andr​​oid应用程序,用户可以在登录使用Facebook / Twitter的。In my android application, user can logging in using facebook/twitter.https://graph.facebook.com/username/pictur...

在我的Andr​​oid应用程序,用户可以在登录使用Facebook / Twitter的。

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

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

https://api.twitter.com/1/users/profile_image?screen_name=screenname&size=normal

使用上述网址我知道,我可以得到的图片,但有什么办法,我可以下载并存储在我的数据库?

using above url i know, i can get picture but is there any way i can download and store it in my database?

我需要用户的个人资料图片谁登录使用Facebook / Twitter的名单,我必须从我的服务器数据库中得到它。 (我有显示类似下图)

i need list of user's profile picture who logged in using facebook/twitter and i have to get it from my server database. (i have to display like below image)

推荐答案

使用的AsyncTask的下载它,并把它保存到你的应用程序的磁盘空间。在你的数据库,只存储图片的文件路径(我将其保存的文件名作为FB用户ID)。

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).

您可以看到如何使用的AsyncTask做在GitHub上我的code网络连接。 https://github.com/nedwidek/Android-Rest-API

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

我需要切换工作区才能到code,与本地存储的工作。

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

阅读全文

相关推荐

最新文章