The documentation says
config = 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
and
client.update('Hello, from Twitter Gem!')
But where do I put them? (also, why do documentation assume everyone knows where to put things?)
What is one valid design for doing this
For example, I have a twitter button on a post. When the twitter button is clicked, I want it to tweet that post (nevermind about handling shortening the post).
Should i put the tweeting client.update('Hello, from Twitter Gem!')
in an action of a newly created twitter controller?
Or make it a button that calls a javascript file with that tweeting code in it?
I just need one valid way of getting the tweeting button to be functional.