Pointing Abraham Williams’s PHP Library for Twitter OAuth to Twitter API 1.1

Print This Post Email This Post Share

I’ve mentioned before how I’m using Abraham Williams’s PHP library for Twitter OAuth for various projects. With the impending decommissioning of version 1.0 of the Twitter API the question has come up as to how to edit this library so it uses version 1.1 of the Twitter API instead. It’s actually quite simple:

  1. Open twitteroauth.php.
  2. Go to line 21 where is says ‘public $host = “https://api.twitter.com/1/”;’
  3. Change this line to ‘public $host = “https://api.twitter.com/1.1/”;’
  4. Save the file.

That’s it! You’re now using Twitter API 1.1.

Tags: , ,

If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.

Comments

Thanks!

Leave a comment

(required)

(required)