1.1 PHP Libraries


#1

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


#2

Anyone?


#3

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


#4

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


#5

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.


#6

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


#7

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


#8

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


#9

@cgruiz79 it works fine for me
Thanks


#10

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


#11

gracias m sirvio :smiley:


#12

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)
->performRequest();

in index.php

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


#13

Thanks i change line and this works!