Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to download pic from url ? #19

Closed
langkins opened this issue Jun 4, 2010 · 7 comments
Closed

how to download pic from url ? #19

langkins opened this issue Jun 4, 2010 · 7 comments

Comments

@langkins
Copy link

langkins commented Jun 4, 2010

this is the url : http://profile.ak.fbcdn.net/profile5/650/120/q688291774_4527.jpg

if i user URL to open stream , then it returns Host unknown
could anybody tell me how to do that ? thank you.

@soneff
Copy link

soneff commented Jun 4, 2010

Could you provide a snippet of code explaining what you are trying to do? Are you just trying to download the image?

@langkins
Copy link
Author

langkins commented Jun 5, 2010

like

URL url = new URL(urlStr);
URLConnection conn = URLConnection(url)
Object content = conn.getContent();
.....

@langkins
Copy link
Author

langkins commented Jun 5, 2010

yes, i just download the pictures like profile pic and want to show it to the friends list in a listview

@lshepard
Copy link

Does this happen reliably, every time for that URL? Only on the phone or also on the emulator? Or if it's sporadic, is there a pattern to the failures?

@langkins
Copy link
Author

thank you for your reply.
i got the answer about this problem.
it was because i use a proxy for the wifi to connect to fb. and it got some problem with the dns resolving

@keshy
Copy link

keshy commented Jun 29, 2010

Hey,
How did you find the URL for the profile pic?..was it after parsing the JSON response?

Sorry, a noob here...just feeling my way around.
Thanks

@lshepard
Copy link

keshy- the JSON response will contain the profile pic if you explicitly request it:

http://graph.facebook.com/lukeshepard?fields=picture

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants