Twitter4r example

26 views
Skip to first unread message

jmp

unread,
Oct 27, 2010, 3:29:19 PM10/27/10
to twitter4r-users
Hey I tried to download the tweetapp app but im getting dead links, is
this something that i can get?

-Jason

Susan Potter

unread,
Oct 28, 2010, 3:43:45 PM10/28/10
to twitter...@googlegroups.com
Hi Jason,

I think this has something to do with Google taking down the file
sharing capabilities for Groups.

It was actually an app that was written to integrate Twitter4R with
older versions of Rails 2.2 and below and it didn't use the new OAuth
mechanism for authenticating and authorizing your application.

For newer versions of Rails you might want to follow the following
basic guidelines:
1. Create a twitter4r.rb initializer (in config/initializers) that
looks something like the following: http://gist.github.com/652165
2. For each user you will need to save the OAuth access key/token and
secret in a database and each time you wish to invoke a Twitter.com
API request via any of the methods in Twitter4R you would initialize
the Twitter::Client object like so:
client = Twitter::Client.new(:oauth_access => { :key =>
ACCESS_KEY, :secret => ACCESS_SECRET })

Then you will be able to use any of the methods on the client object
(assuming your app's consumer key requests all the necessary access
from that user, i.e. read and write if you need to update or just read
if you just need to import their tweets and read from the API).

Hope that helps and let me know if there are any questions about this.
Susan

> --
> You received this message because you are subscribed to the Google Groups "twitter4r-users" group.
> To post to this group, send email to twitter...@googlegroups.com.
> To unsubscribe from this group, send email to twitter4r-use...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/twitter4r-users?hl=en.
>
>

--
twitter:@SusanPotter
github:mbbx6spp
linkedin:http://www.linkedin.com/in/susanpotter

Reply all
Reply to author
Forward
0 new messages