Getting photos from Instagram

You must Login before you can answer or comment on any questions.

Hi,

I need to be able to get photo's from Instagram, does anybody have an example of how to do this?

Regards, Steve

4 Answers

Titanium Appcelerator Instagram Code ... This code is almost two years old and I havent tested it in a while — Gist

Instagram API for Appcelerator Enjoy

— answered 8 months ago by Aaron Saunders
answer permalink
4 Comments
  • Thanks for that :-) PS - I'm using a webview in order to get the access token, is there a better way?

    — commented 8 months ago by steve green

  • that is the correct way.. see the API code, it explains it all.

    I will write a blog post to go along with the gist to show it working completely.

    Please mark the answer correct when and if you believe it has solved your problem.

    — commented 8 months ago by Aaron Saunders

  • Will do :-)

    — commented 8 months ago by steve green

  • Show 1 more comment

A quick Google turned up this https://github.com/scuciatto/Instagram-Titanium

— answered 9 months ago by Shannon Hicks
answer permalink
1 Comment
  • Thanks for that. Notice a lot of iphone specific code in there, need it to run on android too. I did find this http://we-love-programming.blogspot.co.uk/2011/08/javascript-implementing-instagram-api.html, but not sure how to implement in titanium.

    Regards

    — commented 9 months ago by steve green

Hello,

I think that you will get more answers with a more specific question, it should be a simple query but I think that you need authenticate the user first via oAuth.

Regards

— answered 9 months ago by Arturo Leon
answer permalink
1 Comment
  • Hi,

    I want the user to be able to select photos from instagram, when selected, the photo's would appear in a scrollableview - basically like getting photo's from the phones gallery, but from instagram instead.

    Thanks

    — commented 9 months ago by steve green

Been trying to figure out how to use the InstagramMgr class, it looks well constructed and modular, though I'm trying to use it, example:

Ti.include('lib/InstagramMgr.js');
 
InstagramMgr.init('xxx_CLIENT_ID_xxx', 'http://somedomain');
 
// my button to login to Instagram
instaLoginButton.addEventListener('click', function() {
    InstagramMgr.login();
});
When I run the code above, the webview window loads to the redirect uri http://somedomain. In the trace out, I see in the console returning the token:
[DEBUG] New scheme: <NSMutableURLRequest http://somedomain.com/#access_token=XXXXXX.XXXXXXX.XXXXXXX>
When I break-point in function authorizeUICallback(e) none of the conditions passed:
if (e.url.indexOf('#access_token') != -1) // line 221
OR 
else if ('http://instagram.com/' == e.url) { // line 238
OR
else if (e.url.indexOf('#error=access_denied') != -1) {
I simply want to fetch the images of the user, and looks like I got the token from the debug trace out. Curious if anybody got this work?

Your Answer

Think you can help? Login to answer this question!