I think you're getting confused of how to use the Twitter
gem to create Tweets:
client.update("I'm tweeting with @gem!")
This is how you can create a new tweet. This is based on the idea you've already initialized an object & associated with the variable client
:
#config/initializers/twitter.rb
client = Twitter::REST::Client.new do |config|
config.consumer_key = "YOUR_CONSUMER_KEY"
config.consumer_secret = "YOUR_CONSUMER_SECRET"
end
Code
Although not a direct answer to using fabrication
, I would suggest you have to adapt your syntax to accommodate the loading of this gem (connecting to the Twitter API), and then use fabrication
to sort it out