Welcome Guest, Not a member yet? Register   Sign In
Twitter Library for CI 2.0.3
#1

[eluser]CJL01[/eluser]
I've been trying to get a good library to make simple posts to Twitter using CI 2.0.3. I stumbled across an Oauth PHP library by Matt Harris which I was able to tweak to get a simple CI app which worked well.

Instructions for use:

1) Copy the twitter.php config file into application/config and insert your keys/tokens from Twitter.
2) Copy TmhOAuth.php and TmhUtilities.php into the application/libraries folder.
3) Copy the twitter.php controller into your application/controllers folder.
4) Call the twitter controller through your web browser.

The controller output is the response from Twitter. If the post was successful, then you will see a detailed response. If something goes wrong you will see the error message.

This example is a simple post. If you want to do other things (eg show followers), then edit line 24 of the controller with the appropriate Twitter API call. See https://dev.twitter.com/docs/api for more info.

Enjoy!


Messages In This Thread
Twitter Library for CI 2.0.3 - by El Forum - 09-26-2011, 12:42 PM
Twitter Library for CI 2.0.3 - by El Forum - 08-29-2012, 10:44 PM



Theme © iAndrew 2016 - Forum software by © MyBB