Twitter_oauth class in codeigniter

The following code loads the oAuth library and sets up a set of variables for us to store certain information in.

require_once(APPPATH.'libraries/twitter/OAuth.php') ;
class Twitter_oauth
  var $consumer;
  var $token;
  var $method;
  var $http_status;
  var $last_api_call;

$consumer— it is used to store the credentials for our application keys and the user tokens.
$token— this is used to store the user credentials. A new instance of the oAuth class OAuthConsumer is created and stored in this variable.
$method— this is used to store the oAuth Signature Method (the way we sign our oAuth calls).
$http_status and $last_api_call, are used to store the last HTTP Status Code and the URL of the last API call, respectively. These two variables are used solely for debugging purposes.

Enjoyed this post? Share it!


Leave a comment

Your email address will not be published.