PHP snippets to interact with Twitter
Posted November 16th, 2010 in Offsite Articles and PHP
Jean-Bapiste Jung compiled a useful collection of PHP snippets to interact with Twitter over at Cats Who Code. All the code you need is included with a link back to the originating website.
Read the comments and check for updates
If you are planning on using any of them it's a good idea to a) check the comments on Jean-Bapiste's page and b) click through to the originating website and see if there have been any updates or enhancements and to read any user comments on those pages as well.
The snippets
All the snippets query data only, and do not post anything, so no open auth work is required.
The list of snippets are as follows:
- get number of Twitter followers
- get latest Twitter status
- link to update status
- get number of retweets for a specifc page from tweetmeme.com
- testing a friendship between two users
- shorten URLs with TinyURL
- shorten URLs with Bit.ly
Obviously the last two aren't Twitter specific and can be used for URL shortening in any project. They're included in the list because of the need to shorten URLs when trying to post within Twitter's 140 character limit.
Read the article
Read the full article and list of snippets here: PHP snippets to interact with Twitter

Comments
blog comments powered by Disqus