Monday, December 27, 2010

getting twitter followers into our rails application

By using the twitter_oauth gem we have get the followers from twitter to our rails application.

@client = TwitterOAuth::Client.new(
:consumer_key => '*',
:consumer_secret => '*',
:token => '*',
:secret => '*'
)


@client_followers_all = @client.followers(@page.to_i)
@client_followers = [];i=1;
@client_followers_all.each do |twt|
@client_followers << twt if i<=10
i=i+1
end


by using the @client_followers we have to display where we have to need. 

No comments:

Post a Comment