May 26, 2009...7:10 am

building with twitter4r

Jump to Comments

Wow is this thing impressive... i love it!   I’ve been searching for a good twitter plugin/gem.  Needed a way to hook into twitter without much legwork. Excellent resource,. 100% Twitter REST API coverage. It does it all, public/private timeline, status updates, the works. This is going to frickin’ fun!

To install it: sudo gem install twitter4r

I DID have to configure it a bit more for my needs though. When pulling in user statuses’, doesn’t return the FULL list of status attributes. By default it just returns the status’ user, text, created_at and ID.  The essentials but I needed the full lot. No worries

After installing the gem Open /vendor/gem/twitter4r-0.3.0/lib/twitter/model.rb

Scroll down and find the STATUS Class.

Within the class you can modify/edit/add your other attributes if necessary. Worked well for me. In my case I added :in_reply_to_user_id to the @@Attributes array and that was a wrap.

Now let’s keep building…

but i had to change that… so i opened up /vendor/gem/twitter/twitter.rb… scrolled down and found the STATUS method, and added in the other attributes. easy enough… now lets keep working.

1 Comment


Leave a Reply