Software Archive
Read-only legacy content
17061 Discussions

Instagram Web Service - no working example of an XDK app

Ed_O_
Beginner
307 Views

QUESTION 1

I've managed to get instagram images showing up in the XDK but on an app (and in app preview) all I get is "need access token before making call". I can see the example binding doesn't even try to do any authentication. In the XDK (using Develop > Web Services > Intsagram > Authenticate) I see... intel.xdk.services.iodocs_.instagram.authenticate ..called, which does authentication, but that code is only in the XDK, it isn't anywhere in the binding or the app. How do I call this in an app? The app doesn't do any authentication at all - what am I missing?

QUESTION 2

As an alternative to the above I tried this - https://github.com/krisrak/jquery-cordova-oauth2 ;- which does at least try to do some authentication, but it opens the instagram login page.  I shouldn't need to log in to instagram to see images in an app - I'm using the Instagram account Client, ID and Secret- so again, what am I missing?

 

One working example of the Instagram Web Service in an XDK app would be useful!

0 Kudos
5 Replies
Amrita_C_Intel
Employee
307 Views

Hello,

Did you look in to this plugin?

https://github.com/vstirbu/InstagramPlugin ;

which loads a canvas image into the instagram editor.

0 Kudos
Ed_O_
Beginner
307 Views

Hi Amrita, you misunderstand. That plugin connects to the Instagram app, My question has nothing to do with the Instagram app. To clarify, I've built an app in the XDK which connects to Instagram's API using client credentials. It works in the XDK when I test the Web Service (under Develop) and manually log in to Instagram. But I shouldn't have to log in to Instagram at all..The app should connect to Instagram, authorize with client credentials, and show images - I expect to see images in my app without having to log in to Instagram - I've found no working XDK examples. Is it possible?

0 Kudos
PaulF_IntelCorp
Employee
307 Views

Ed -- search for a working Cordova or PhoneGap example. The XDK builds Cordova apps. So if you can find something that works for Cordova it will work for the XDK, because they are the same thing. Sorry, but we don't have any examples that are specific to Instagram.

That code in your first reference is generated by the "web services" part of the XDK. There is a JavaScript library tucked away inside your project that was created. There is a webinar explaining the services piece, which might help, here > https://software.intel.com/en-us/xdk/docs/webinars-videos-links

0 Kudos
Ed_O_
Beginner
307 Views

Thanks Paul, but that's no help I'm afraid. You misunderstand the aim of the app we're building. I want to show images from an (e.g. our) Instagram account without the user having to log in to their own Instagram account. I've already got the web service (Cordova plugin) working - it requires manual authentication from the user (logging in to Instagram) in the app (or XDK) so it's of no use for this task.

To be clear, the Instagram API requires users log in to Instagram before it issues any authentication. It's dumb, as it means we cant show our own images in our own app unless the user has (and logs in to) their own Instagram account. Anyway, after two days wasted on the web service I found this... http://stackoverflow.com/questions/17373886/how-can-i-get-a-users-media-from-instagram-without-authenticating-as-a-user ...which shows it's better to ignore the Instagram API altogether. (e.g. do https://www.instagram.com/bbc/media/). Results are limited but they are at least accessible. The Instagram API's only use is to connect an app to the user's own Instagram account. 

0 Kudos
PaulF_IntelCorp
Employee
307 Views

Thanks for the clarification. I understand now. Glad to hear you found a workaround.
 

0 Kudos
Reply