How can I make my imp light an LED if I am mentioned on Twitter

Hi there. I have an Apirl breakout board. I’ve ran the Blink-O-Matic demo and then customised the HTTP in demo to make the single LED light if I enter “1” or “0” into an input field and submit.
I’d now like to hook my imp up to twitter to make an LED flash if I am mentioned.
How would I go about this? I guess I need to build some sort of server-side app that will send a POST request to the imp each time I am mentioned. Is there a way I can do this without having to write a server-side script myself e.g. something like IFTTT?

Great product, very happy to see the LED flashing!

This used to be really easy to do with Twitter’s search API because there was no authentication…

As of a couple weeks ago this changed - I’m actually working through an example similar to this right now, and should have some code later today if everything goes well :slight_smile:

I’m not 100% convinced it will (because oAuth can get messy without an interface… but we’ll see!)

If it works, the example will be self contained and not require any extra servers, but will require the agent beta (let me know if you would like to be part of it).

Hi. Thanks for the info. I’d love to be a part of the beta.
PM me when you have something running.

This new Twitter API has killed some of my latest builds
I have 3 devices/builds that used the old version and now need a ton of work to get them up again. One was a simple USB notifier but am planning on moving this to an Imp in an April and adding some more function/output once I wrap my head around these changes.

I am now thinking down the lines of using an RGB LED to act as a notifier and pulse Green for a Mention and Red for new tweets from a selected user with the pulse turning into a steady glow after a specific time.

I had a similar thing set up on a RasPi with Python first sending a notification to the RGB on an LEDBorg and then moved it on to output the actual content of mentions/new tweets to a mini LCD and then to a mini thermal printer. It worked flawlessly up till about 3 weeks ago!

Watching this progress with interest. Likewise if you need any testing then just shoot me the details.

OK - here we go! I worked up an example of how to search for tweets with the new (v1.1) Twitter API.

We’re using Application level authentication - which allows us to hit any of the Twitter API endpoints that don’t require a User Context. This means we can search for tweets, but we can’t make new tweets :frowning:

Here is a Gist with all of the code. The last 3 files are the most interesting, and together form a complete example (although nothing interesting happens in the device - that’s up to you).

I also wrote up a quick blog post about this - you can check it out here if you’re interested.

I’m really impressed…

Fantastic, will give this a shot as soon as I get a chance, thankyou!