I’m looking to implement a system for tweeting directly from my site backend, which is written in PHP 5. I have a script from the internet that I can adapt, but I’m concerned that when Twitter switches to Oauth only, I’ll be out in the cold.
Basically, I’m hoping someone can point me toward a script/tutorial that will let me do the following:
- access twitter via the Oauth system
- Post Tweets and receive error codes
- Let me define an application/site name (I’m a bit fuzzy on whether Twitter allows this)
Ideally I need all 3 points explained in detail.
Thanks
I use the twitteroauth library: http://github.com/abraham/twitteroauth – “The first PHP Library to support OAuth for Twitter’s REST API”. Works great.
You can register a Twitter application here: http:// dev.twitter.com/apps/new
Once you register a Twitter app you’ll get an app-specific consumer key/token and secret, which you can then use with the twitteroauth library to access the Twitter API.