Posts Tagged ‘twitter’

Ping.fm bookmarklet for multiple Ping.fm accounts

// March 1st, 2010 // No Comments » // RC Tips, Software, Web 2.0

Since Ping.fm doesn’t allow you to add multiple Twitter accounts to one Ping.fm account, I’ve resorted to have two accounts with them, one for my personal accounts (Twitter, Facebook, MySpace) and one for my professional accounts (Twitter, Facebook, LinkedIn). To update my status for either Ping.fm account I use the special email addresses they offer and my email client.

My problem was when I wanted to post the current page I’m reading to either account. Ping.fm offers a bookmarklet, but it uses the current logged in ping.fm account, so I would have to continually log in and log out. I decided to put together my own bookmarklet that starts up a new mail message in my default email client addressed to the correct Ping.fm account. To get started, drag the following link to your bookmark bar:

Ping.fm

Once there, right click on the link, select edit and replace YOURPRIVATEPINGADDRESS with your private Ping.fm email address (just the part to the left of the @). Would you like to do it with GMail? Drag this link:

Ping.fm

And once again, right click on the link, select edit, and replace YOURPRIVATEPINGADDRESS with your private Ping.fm email address.

You can drag the links multiple times, editing the email address and the name of the link so you can associate each one with a different Ping.fm account.

Following lots of people on Twitter? You need ReadTwit

// January 12th, 2010 // No Comments » // Online Tools, Software, Time Management

10th November 314/365
Creative Commons License photo credit: fifikins

A couple of months ago I decided to expand my use of Twitter, and began following more and more people in the education community. This was awesome, until I realized I could not keep up with the barrage of data that I was being given. In November I started brainstorming ideas on how to keep up. I noticed in any of my twitter clients that they were not grabbing all the tweets that had been posted from the last time I checked. The reason being is the API only gives you the last 200 tweets, and for me that was about 40 minutes worth.

My first course of action was to write some software that would grab the tweets from my @mr_rcollins timeline, parse the info and store it in a MySQL database. Besides pulling out the data I was interested in of each tweet, I also stored the complete tweet. This became impractical, since in a month the complete tweets themselves occupied 4.2GB! I stopped storing the complete tweets which left me with a 20MB database after a 5 weeks of collecting, which was a lot more manageable.

The next step was to start parsing the tweet’s text for urls, resolve any shortened urls, and dump them into another table for me to peruse. While I got that software working, I came across ReadTwit.com. This is a great service that will take your timeline, parse out the urls, resolve shortened links, and give you a RSS feed that you can subscribe to in your favorite RSS reader (I use Google Reader. Now I just go through Reader like normal, and am able to tag/star important sites that are posted to my Twitter timeline.

Group Twitterbot is broken. :-(

// May 11th, 2009 // No Comments » // Online Tools, Software

Twitter updated how direct messages are emailed, so my Group Twitterbot code is now broken. I’m hopefully going to be able to work on it this week. I’m planning on fixed this problem and set it up so it’s more stand alone, you’ll be able to use it anywhere you can have a php based web page.

Group Twitter bot

// January 16th, 2009 // 4 Comments » // 21st Century Skills, Online Tools, Software

Chris Hamady had the idea that at the eTech Ohio State Technology Conference we should be able to use Twitter to communicate great things that individuals see throughout the conference. It needed to be set up easy enough for people that have not been using Twitter to use. After discussions with John Schinker, they contacted me and I came up with the idea of a twitter bot that people would follow, and direct messages to that bot would be sent to all the bot’s followers. This way most people can just follow the bot and get updates, and those that wanted to send out an update would only need to send a direct message to the bot with the update.

The way the bot works is off of the emails that Twitter sends out when a Twitter account receives a notification of a new follower or a direct message. The requirements for the bot are:
• A twitter account (in this case it is etechohio09)
• An email account with POP3 access (in this case a gmail account is used. This email account address needs to be secret because there isn’t any checking on the validity of where an email came from so this would allow people without even a Twitter account to spam the bot)
• a unix based host with php at the command line (I use Ubuntu, but it should work in OS X)
• fetchmail also needs to be available

The process to set up the bot is as follows:
1. An email account is set up at gmail. This account must of pop3 turned on, which you can do from the gmail settings.
2. Create a Twitter account, using the above email account. In Twitter be sure to go to Settings -> Notices and have the notices for followers and direct messages checked.
3. Set up an account on the unix host for the bot.
4. Login to the account on the unix host.
5. Create the .fetchmailrc:

     nano -w .fetchmailrc

6. Enter the following lines to that file:

     set logfile /home/UNIXACCOUNT/fetchmail.log
     poll "pop.gmail.com" proto POP3 timeout 100 no uidl
     no envelope user "BOTACCOUNT@gmail.com"
     password "BOTPASSWORD" fetchlimit 100 ssl

7. Create the logfile:

     touch fetchmail.log

8. Create the .forward file:

     nano -w .forward

9. Enter the following line:

     |"/home/UNIXACCOUNT/twitterbot.php"

10. Download twitterbot.php, and make it executable:

     chmod +x twitterbot.php

11. Edit twitterbot.php and enter your Twitter username and password:

     nano twitterbot.php

12. Start up fetchmail in daemon mode and your bot should be functional.

     fetchmail -d 60

What will happen is that fetchmail will check the email account every 60 seconds. Any email will be downloaded and each message passed to twitterbot.php. twitterbot.php will examing the headers for the twitter command and then act accordingly. If it is a new follower, twitterbot will start following that person. If it is a direct message, twitterbot will then post that message to the bot’s timeline for all its followers to read.

The email class used for this twitterbot came from phpclasses.org, modified to pull out a few of the X-headers that Twitter adds so the bot can figure out the type of message and who is sending it.

Powered by Web Design Company Plugins