Skip to content

Commit

Permalink
Fixes twitter updating.
Browse files Browse the repository at this point in the history
  • Loading branch information
wilkie committed Aug 6, 2014
1 parent b8085dd commit f2d78d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/update.rb
Original file line number Diff line number Diff line change
Expand Up @@ -301,14 +301,14 @@ def send_to_external_accounts
# send the update
if self.twitter? && author.user.twitter?
begin
Twitter.configure do |config|
client = Twitter::REST::Client.new do |config|
config.consumer_key = ENV["CONSUMER_KEY"]
config.consumer_secret = ENV["CONSUMER_SECRET"]
config.oauth_token = author.user.twitter.oauth_token
config.oauth_token_secret = author.user.twitter.oauth_secret
end

Twitter.update(text)
client.update(text)
rescue Exception => e
#I should be shot for doing this.
end
Expand Down

0 comments on commit f2d78d8

Please sign in to comment.