CodeIgniter Forums
CodeIgniter-Twitter Library - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forum-22.html)
+--- Thread: CodeIgniter-Twitter Library (/thread-14423.html)

Pages: 1 2 3


CodeIgniter-Twitter Library - El Forum - 01-02-2009

[eluser]simonmaddox[/eluser]
After having a bit of a look online, I found that the only CodeIgniter library for Twitter works by looking at RSS feeds (http://www.haughin.com/code/twitter/).

So, CodeIgniter-Twitter was born. It's a library which provides simple access to the Twitter API, allowing you to do things like:

- Post a new tweet
- Access/send direct messages
- Follow new people
- Update a user's profile

etc...

Usage is as follows:

Code:
$this->load->library('twitter');
$this->twitter->auth('someuser','somepass');
$this->twitter->update('My awesome tweet!');

As long as you call the auth() method before anything else in the class, everything should work fine.

You can download the library by visiting the project's page on Github here:
http://github.com/simonmaddox/codeigniter-twitter/tree/master


CodeIgniter-Twitter Library - El Forum - 01-02-2009

[eluser]bitist[/eluser]
Thanks for sharing, this is really useful.


CodeIgniter-Twitter Library - El Forum - 01-02-2009

[eluser]simonmaddox[/eluser]
Thought I'd post an update - after a little bit of testing (2 minutes), it looks like this can be used as a library in Kohana, and as a standard class in PHP. It's not necessarily limited to just CodeIgniter.


CodeIgniter-Twitter Library - El Forum - 01-21-2009

[eluser]nstokes[/eluser]
Thx for sharing this Simon. I've implemented it, but seem to be running into a problem when I pass params to some of the methods. For example, when passing in a page param to the replies method:
Code:
$data['replies'] = $this->twitter->replies('','',2);

It returns me nothing, however when I don't have any params in there:
Code:
$data['replies'] = $this->twitter->replies();

it works just fine. Anyone else run into this? Or can anyone help me discover why these aren't working?

Thx in advance!


CodeIgniter-Twitter Library - El Forum - 02-04-2009

[eluser]murphy2006[/eluser]
Hello,

Does anyone know how to list twitter status messages on a page?
It works fine do update the status and run through the messages with the below code
but how do I write out the message text for each message?

Right now I can only see that the Foreach has looped through the list as many times as I got status messages, but I would like to print out the ID and message text of each status so that I can delete via the API too.

Code:
$data['details'] = $this->twitter->user_timeline();

Thankful for all help!

Kind Regards,
Daniel


CodeIgniter-Twitter Library - El Forum - 02-04-2009

[eluser]murphy2006[/eluser]
Hi again,

I solved the listing of status messages. Got another small problem now.
The deletion (destoy) of status messages is not doing it´s job. No messages gets deleted.

What can be wrong?


CodeIgniter-Twitter Library - El Forum - 02-04-2009

[eluser]MikeHibbert[/eluser]
Wow excellent thanks!

Now all I have to do is find an excuse to put it on one of my sites ! Big Grin

Keep up the good work!

Mike


CodeIgniter-Twitter Library - El Forum - 02-04-2009

[eluser]murphy2006[/eluser]
I seem to have fixed the deletion problem too now but if I got one (1) or less messages on my twitter account there is an error message. If I got 2 or more messages there are not errors. What is wrong?


CodeIgniter-Twitter Library - El Forum - 02-12-2009

[eluser]Phil Sturgeon[/eluser]
You need to call this library TwitIgniter.


CodeIgniter-Twitter Library - El Forum - 02-12-2009

[eluser]Tom Schlick[/eluser]
@pyromaniac - or how bout "bird caught on fire by the total awesomeness of codeigniter... and gasoline"