Searchtweet - Design patches that respond to twitter posts.
Update: Version 1.2 is available to download, adding support for custom Twitter API keys. This was requested by some users to increase reliability. Version 1.0 and 1.1 do not work any more due to changes in Twitter's API.
Searchtweet is a mxj external that searches twitter with a given keyword and returns a desired maximum number of most recent posts, with username, date and twitter text body routed to separate outlets. The object returns a specified number of most recent twitter posts that contain a given keyword, #hashtag, or @usertag.
Advanced search queries also work:
https://support.twitter.com/articles/71577-using-advanced-search
Searchtweet uses the twitter4j library (http://twitter4j.org) programmed by Yusuke Yamamoto.
Note:
Unless custom API keys are entered, the plugin will default to its own authentication keyset. This may limit the number of searches per given time. Eg. You must optimize your search frequency to avoid hitting the API rate-limits. (Ex. Do not connect a [metro 10] to the inlet, your IP will be banned in no second)
For more info:
https://dev.twitter.com/docs/faq
Have fun,
Gokce
- GokceApr 16 2013 | 11:06 amThanks for the information David! This is amazing.The search parameters indeed work well with the script! There is a small trick. Max will interpret the commas in the message as separators. The message sent to the script needs to be formatted as shown below with backslashes before each comma, such as:search geocode:40.748433\,-73.985656\,1km 1Put that in a message box and wire it to the mxj directly. (Do not use the search box in the example patch.) This should give the most recent tweet sent from an area within 1km radius around the Empire State Building in New York. Tested, and here's the result I received:"fangirlDANosaur" "RT @danisnotonfire: I'm currently having that classic tourist fangirl moment where I realise I know all the buildings in Manhattan from every movie/game ever. "Looks like she is in New York. Exciting! Now go play!Gokce
- ThierryApr 25 2013 | 5:52 amHi David and Gokce,Thanks for your precisions about language filtering and geocode. I would like to filter the tweets according to their language. But, as "search geocode:40.748433\,-73.985656\,1km 1" works perfectly for me, "search voyage lang:fr 1" returns the following errors :java.lang.UnsupportedOperationException: does not contain an int at com.cycling74.max.Atom.getInt(Atom.java:572) at searchtweet.search(searchtweet.java:34)Did I miss something ? Thanks a lot if you would have an idea... -ThierryPS: Gokce: I left a question on your FB page about language filtering, before having found this page, sorry :)
- DRKOSSJun 12 2013 | 12:42 pmAha - twitter changed the API!We will begin 410ing inbound API v1 traffic now. We will gradually ramp up over the next several minutes. More info: https://dev.twitter.com/docs/faq#17750Have a show using this object in a few weeks, so if anyone has an idea, i would be very grateful and have no other choice but to buy you some beers in NYC!
- LindenJul 15 2018 | 10:24 pmthis is great! i wonder if some tweets get shortend?? it seems messages get truncated after 140 types or so... am i missing something?
- Billie-Grace DunkSep 25 2018 | 8:40 amHi - wondering if this still works for anyone else? I am having issues getting it working with error messages in max console along the lines of 'trustAnchors parameter must not be empty'. New to world of coding and not sure what this means. If someone could help that would be fantastic!
- ClauOct 16 2018 | 7:03 pmHi Gokce,first of all thank you for this fantastic tool!!I have an installation using this tool and last time I presented was May 2017 and everything was working fine, I didn't get errors at all, but now, I updated my system to high sierra and updated Java and the patch is not working any more , I get a long list of errors... (see below) could you please give me some advice? I'd really appreciate! thanks in advance!Claujava.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty Relevant discussions can be found on the Internet at: http://www.google.co.jp/search?q=506c3b98 or http://www.google.co.jp/search?q=13a0929a TwitterException{exceptionCode=[506c3b98-13a0929a 63e3f388-6071bc6d 63e3f388-6071bc6d 63e3f388-6071bc6d], statusCode=-1, message=null, code=-1, retryAfter=-1, rateLimitStatus=null, version=4.0.1} at twitter4j.HttpClientImpl.handleRequest(HttpClientImpl.java:179) at twitter4j.HttpClientBase.request(HttpClientBase.java:53) at twitter4j.HttpClientBase.get(HttpClientBase.java:71) at twitter4j.TwitterImpl.get(TwitterImpl.java:1968) at twitter4j.TwitterImpl.search(TwitterImpl.java:293) at searchtweet.search(searchtweet.java:64) Caused by: javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:190) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1747) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1708) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1691) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1222) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1199) at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:476) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:166) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1195) at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:379) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:318) at twitter4j.HttpResponseImpl.<init>(HttpResponseImpl.java:35) at twitter4j.HttpClientImpl.handleRequest(HttpClientImpl.java:143) ... 5 more Caused by: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty at sun.security.validator.PKIXValidator.<;init>(PKIXValidator.java:57) at sun.security.validator.Validator.getInstance(Validator.java:161) at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.getValidator(X509TrustManagerImpl.java:108) at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:204) at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:249) at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1188) at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:135) at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:593) at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:529) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:943) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1188) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1215) ... 13 more Caused by: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty at java.security.cert.PKIXParameters.setTrustAnchors(PKIXParameters.java:183) at java.security.cert.PKIXParameters.<;init>(PKIXParameters.java:103) at java.security.cert.PKIXBuilderParameters.<;init>(PKIXBuilderParameters.java:87) at sun.security.validator.PKIXValidator.<;init>(PKIXValidator.java:55) ... 24 more Failed to search tweets: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty Relevant discussions can be found on the Internet at: http://www.google.co.jp/search?q=506c3b98 or http://www.google.co.jp/search?q=13a0929a TwitterException{exceptionCode=[506c3b98-13a0929a 63e3f388-6071bc6d 63e3f388-6071bc6d 63e3f388-6071bc6d], statusCode=-1, message=null, code=-1, retryAfter=-1, rateLimitStatus=null, version=4.0.1} at twitter4j.HttpClientImpl.handleRequest(HttpClientImpl.java:179) at twitter4j.HttpClientBase.request(HttpClientBase.java:53) at twitter4j.HttpClientBase.get(HttpClientBase.java:71) at twitter4j.TwitterImpl.get(TwitterImpl.java:1968) at twitter4j.TwitterImpl.search(TwitterImpl.java:293) at searchtweet.search(searchtweet.java:64) Caused by: javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:190) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1747) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1708) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1691) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1222) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1199) at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:476) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:166) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1195) at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:379) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:318) at twitter4j.HttpResponseImpl.<init>(HttpResponseImpl.java:35) at twitter4j.HttpClientImpl.handleRequest(HttpClientImpl.java:143) ... 5 more Caused by: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty at sun.security.validator.PKIXValidator.<;init>(PKIXValidator.java:57) at sun.security.validator.Validator.getInstance(Validator.java:161) at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.getValidator(X509TrustManagerImpl.java:108) at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:204) at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:249) at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1188) at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:135) at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:593) at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:529) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:943) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1188) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1215) ... 13 more Caused by: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty at java.security.cert.PKIXParameters.setTrustAnchors(PKIXParameters.java:183) at java.security.cert.PKIXParameters.<;init>(PKIXParameters.java:103) at java.security.cert.PKIXBuilderParameters.<;init>(PKIXBuilderParameters.java:87) at sun.security.validator.PKIXValidator.<;init>(PKIXValidator.java:55) ... 24 more Failed to search tweets: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
- Gokce KinayogluOct 18 2018 | 1:12 amHi all, looking at the errors posted here it seems like the problem arises from a Java 8 issue, or certificate incompatibility with the new Mac OS. Have any PC users recently tried the plugin?Also, because I am not able to actively maintain the project, I decided to open up the source code to the community. Here's the github link:https://github.com/gokcekinay/searchtweet
Please note that we are no longer taking submissions for Tools and no longer supporting the Tools section, so you may run into broken files and URLs.
Contribute to the Cycling '74 Community through any of the following instead:
Submit a Max PackageAdd to MaxObjects.comShare a Project
Contribute to the Cycling '74 Community through any of the following instead:
Submit a Max PackageAdd to MaxObjects.comShare a Project