We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello everyone,
I've tried endlessly to resolve this myself, but keep on running into walls... I feel like this is something the Processing community could do in their sleep!
I originally made a Processing sketch in 1.5.1 (back in 2011) that used the "Programming from A to Z" function by Daniel Shiffman to query Twitter's XML feed and record the mentions of the words "want" and "need". It would then display the results from each word on a running line graph, similar to an electrocardiogram.
I had made this into a web app using processing-1.1.0.js at the time, but it no longer works when viewed online as Java has become antiquated.
The online version is available here: http://goo.gl/ZlCQe
And the ZIP of the sketch is here: http://goo.gl/BgcRX
Now that I'm dusting this off and opening it with 3.1.1, I keep getting an error:
The class "XMLElement" does not exist
This thread answered my question, but when I changed all mentions of "XMLElement" to "XML", I got the new error:
The constructor "XML(PApplet,String)" does not exist
Since this happens in the RetrieveData.pde, code which I didn't write, I don't know where to start in updating the code. I'm also really dusty on Programming since 2011. I've tried launching this in Processing 1.5.1, but it no longer opens on OS X 10.11.
Once I had gotten the sketch running again, I was hoping to re-export it in 3.1.1 using the latest Processing.js (or up-to-date web export tool) to display it online.
I'm not exactly sure where to start, but any help is much appreciated!
-A
Answers
reference here:
https://processing.org/reference/XML.html
and a tutorial here:
https://processing.org/tutorials/data/
we'll need to see the code for anything more specific
koogs,
Thanks for the response. I've already gone though the the XML reference and wasn't able to find a solution. I'll take a look at the tutorial you've mentioned. Here is the code from RetrieveData.pde that is not working. (The folder with both necessary pde files is in my first post.)
well for a start, the twitter url in the code (http://search.twitter.com/search.atom) gives me
"The Twitter REST API v1 is no longer active."
it's 10 years old...
yeah, that needs ditching completely, it's no use anymore.
twitter4j is probably the way to go. here's an example of search:
https://github.com/yusuke/twitter4j/blob/master/twitter4j-examples/src/main/java/twitter4j/examples/search/SearchTweets.java
but integrating it into processing is another thing (people have done it)
you'll also need an api account from the twitter website because the new api requires authentication.
Wow. Ok, that definitely answers the question. I guess that API that was active 5 years ago isn't any longer.
Really appreciate the help!