Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

preiostd

macrumors newbie
Original poster
Oct 27, 2012
11
0
Hi
I would like to retrive images from my web or my flicker account or instgram account or my blog to my ios app

can anybody help me with the code
thanks
:)
 
The answer to this is not exactly straight forward. If you just want to get images efficiently on a background thread then I suggest you use EGOImageLoader which can be found with code examples here. It's an easy to use library that will download images from a URL to a UIImageView.

The part where you get images from social networks like Flicker or Instagram is not as simple. You will have to look into each companies API's. It will require a basic understanding of HTTP requests. You will have to use an OAuth authentication point which brings the user from your app to the other website for them to sign in and then sends them back to your app with a token to use in all further HTTP requests. A good library for easily sending HTTP requests is AFNetworking (found here with code examples). After getting the token you will need to make API calls using it to get the images you need.
 
As I assume you've found during your research there are almost no native iOS API's and even the ones that exist are only for posting data, not for getting nearly as deep as I assume the OP is looking to go.
 
Mr harrys1590 and Mr ArtOfWarfare thanks 4 ur replay:)

first for EGOImageLoader i download the example and try it
but it is not working:(

2- for the AFNetworking did u mean that i have to:

1-download AFNetworking
2-use this code to download image to my app

Code:
UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, 100.0f, 100.0f)];
[imageView setImageWithURL:[NSURL URLWithString:@"http://i.imgur.com/r4uwx.jpg"] placeholderImage:[UIImage imageNamed:@"placeholder-avatar"]];

but i think this code will download only specific image from URL
and what i want to download pictures in my website i will have it in my app
and when ever i have new image in my website it will be download to my app


Mr ArtOfWarfare
i will try to Build iOS Flickr App but are you sure that it will work because
i find it hard little bit:eek:
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.