We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
Javascript API (Read 1825 times)
Javascript API
Dec 11th, 2009, 6:50pm
 
Hi, so I am relatively new to all these coding.  I was wondering is it possible to use Javascript to retrieve feeds off APIs like Twitter?  And how do you, if possible with either Javascript or Processing, do you link an image into getting a random API feed?  For example, when you click an image, it will display a random feed of a specific category, such as "wishes" for my project.  

I have looked through multiple posts, but am still very confused about it all.  I have just recently found Twitter4J (Twitter's API), but I don't understand what's the difference between it and Twitter's actual ASROM or JSON API?  

Re: Javascript API
Reply #1 - Dec 12th, 2009, 12:45am
 
There's no need for Javascript to retrieve textual feeds from an URL. It's easier if your feed can output XML.

See


Example :
Code:
String feed = "http://twitter.com/statuses/public_timeline.xml";

XMLElement result = new XMLElement(this, feed);

Re: Javascript API
Reply #2 - Dec 12th, 2009, 2:26am
 
Answered in PImages call API feeds.
Also that's JavaScript, not Javascript (yes, I am niggling).
Page Index Toggle Pages: 1