1.1 PHP Libraries


Are there any PHP Libraries for Twitter API v1.1?




If you use TwitterOAuth, is very easy to upgrade to version 1.1, you just have to change the path shown from 1 to 1.1, by changing a line you have it solved.

I would say in that line, I do not remember exactly where it was, but it was not hard to find


You can use tmhOAuth for twitter api v 1.1, for updating status it works fine


I’ve been using TwitterOAuth and I changed the path for the API root URL in /toauth/twitteroauth/twitteroauth.php here:

class TwitterOAuth { /* Contains the last HTTP status code returned. */ public $http_code; /* Contains the last API call. */ public $url; /* Set up the API root URL. */ public $host = "https://api.twitter.com/1.1/"; /* Set timeout default. */ public $timeout = 30; /* Set connect timeout. */ public $connecttimeout = 30; /* Verify SSL Cert. */ public $ssl_verifypeer = FALSE; /* Respons format. */ public $format = 'json'; /* Decode returned json data. */ public $decode_json = TRUE; /* Contains the last HTTP headers returned. */ public $http_info; /* Set the useragnet. */ public $useragent = 'TwitterOAuth v0.2.0-beta2'; /* Immediately retry the API call if the response was not successful. */ //public $retry = TRUE;

No errors when sending a status update or traversing my user timeline for my latest tweets after making the change. Get a lot more information in the results that are returned.


twitter-aync works as long as you bump the version number to 1.1


This is the best library i config all and work in 3 min


Thank you sir as told i did and now working successfully :slight_smile:


@cgruiz79 it works fine for me


Thanks dude !

I just change the next line
public $host = “https://api.twitter.com/1/”;

To this:
public $host = “https://api.twitter.com/1.1/”;

And works fine again


gracias m sirvio :smiley:


Hi, I have used the link posted by @RListnet, https://github.com/J7mbo/twitter-api-php
And, I changed
$url = ‘https://api.twitter.com/1.1/users/search.json’;
$getfield = ‘?q=Twitter%20API’;
$requestMethod = ‘GET’;
$twitter = new TwitterAPIExchange($settings);
echo $twitter->setGetfield($getfield)
->buildOauth($url, $requestMethod)

in index.php

Which is still giving me an empty result. Please help me in getting some result out of it


Thanks i change line and this works!