Reputation: 19713
I am using the Twitter gem for a company web app, called 'Foobar'. I also have a Twitter account called 'Foobar'. I am trying to tweet onto my Foobar Twitter account from the web app.
From the readme docs:
Twitter.configure do |config|
config.consumer_key = 'YOUR_CONSUMER_KEY'
config.consumer_secret = 'YOUR_CONSUMER_SECRET'
config.oauth_token = 'YOUR_OAUTH_TOKEN'
config.oauth_token_secret = 'YOUR_OAUTH_TOKEN_SECRET'
end
client = Twitter::Client.new
client.update('Hello, from Twitter Gem!')
I have the consumer_key and consumer_secret. But how do I get the oauth token and oauth token secret?
Upvotes: 2
Views: 2499
Reputation: 45
You have to create an application in https://dev.twitter.com
Upvotes: 1
Reputation: 740
You have to create a new application as a developer on twitter. You will get your token after you create it. http://dev.twitter.com/apps/new
For more information: http://dev.twitter.com/pages/oauth_faq
Upvotes: 1