diff --git a/README.md b/README.md index 287ec0e..9143d5c 100644 --- a/README.md +++ b/README.md @@ -9,3 +9,6 @@ Download the twitter.php to your application/library directory Replace variables in the twitter.php library with your own and you're good to go. Check out the twitterexamples.php controller for some example requests + +Featured added: +- Added a config file for nice and ease configurations set up. \ No newline at end of file diff --git a/configs/twitter.php b/configs/twitter.php new file mode 100755 index 0000000..d372412 --- /dev/null +++ b/configs/twitter.php @@ -0,0 +1,16 @@ +_consumerKey = 'Enter your consumer key here'; - $this->_consumerSecret = 'Enter your consumer secret here'; - $this->_oAuthToken = 'Enter your access token here'; - $this->_oAuthSecret = 'Enter your access token secret here'; + $this->config->load('twitter'); + + $this->_consumerKey = $this->config->item('consumerKey'); + $this->_consumerSecret = $this->config->item('consumerSecret'); + $this->_oAuthToken = $this->config->item('oAuthToken'); + $this->_oAuthSecret = $this->config->item('oAuthSecret'); $this->_oAuthNonce = $this->generateNonce(); - $this->_oAuthSignature = ''; - $this->_oAuthSignatureMethod = 'HMAC-SHA1'; - $this->_oAuthTimeStamp = date('U'); - $this->_oAuthVersion = '1.0'; + $this->_oAuthSignature = $this->config->item('oAuthSignature');; + $this->_oAuthSignatureMethod = $this->config->item('oAuthSignatureMethod'); + $this->_oAuthTimeStamp = $this->config->item('oAuthTimeStamp'); + $this->_oAuthVersion = $this->config->item('oAuthVersion'); } /*