background preloader

GATEWAY

Facebook Twitter

PHP

[Python] puzzlescript. Son of the Return of Dr. Twoot. November 16th, 2010 at 9:44 pm by Dr. Drang I’ve spent three months in the Twitter wilderness, but now I’m back home. I finally fixed Dr. Twoot, my HTML/CSS/JavaScript/JQuery/Fluid-based Twitter client, so it works with the dreaded OAuth. The fix didn’t go the way I planned, and Dr. Twoot has, unfortunately, become more complicated. I couldn’t find a JavaScript OAuth library that made any sense to me;the encoding on top of encoding needed to authenticate defeated me—I couldn’t all the steps working together and didn’t know how to debug them individually; andI worried that doing OAuth in JavaScript was a bad decision for security reasons, although I think this is less of a concern for local JavaScript than for JS on the web.

So Dr. During the time I spent trying to do the OAuth stuff in JavaScript, I had run across the Python oauth2 library and used it as check against my JS code. Takes requests from Dr. With this structure, most of Dr. 1 #! Although it’s more complicated to set up, Dr. Twitter Bot | Heaviside Labs. We noticed that one person we follow on Twitter posts very regularly and some of his posts appear to be repeats.

This guy runs a news site and is always trying to get people to view news through his portal. So we wondered if he was perhaps using an automated system to post to Twitter. I looked into doing it and it was pretty easy, within an hour I had my own bot Tweeting for me while I was watching “The Stoned Age.” Here is the code You first have to register an application with Twitter, do that here: don’t worry there is no approval process it’s very quick. Twitter lists a number of libraries for your language of choice but since we all know Python is the greatest language for prototyping an idea I decided to use Python.

After all the dependencies are installed you can install twitter-python. I just have a time-randomized list of tweets to send out. Back to our friend who was posting the same stuff over and over. Python - Where to save CONSUMER_SECRET and CONSUMER_KEY for oAuth app.