0

I am currently using this simple function to get data from twitter API but my rate limit is 150 as i am not using OAuth:

public function getTweetData($idTweet){
    $url =  'https://api.twitter.com/1/statuses/show/'.$idTweet.'.json';
    $json = file_get_contents( $url );
    return json_decode($json, true);    
}

I was wondering how can i authenticate my app to get the 350 limit rate. I am currently using CakePHP framework and i am using this plugin called "CakePHP-2.x-Twitter-Plugin" to work with the twitter API: https://github.com/mishudark/CakePHP-2.x-Twitter-Plugin

They say that "This plugin does not support the "Twitter for Websites" Features (https://dev.twitter.com/docs/twitter-for-websites) like follow buttons or direct authentication."

So, is what i am looking for, a direct authentication? If so, i wouldn't be able to work with this plugin, so, which library would you recommend me for PHP to make this auth call?

Thanks.

Alvaro
  • 40,778
  • 30
  • 164
  • 336

1 Answers1

0

Im not sure how it would work with your plugin, but I downloaded the oAuth.zip from here. This answer also shows the code to authenticate each time. His $content = $connection shows how to get twitter to do things like update etc

Community
  • 1
  • 1
matrim_c
  • 81
  • 1
  • 4