2012-11-18 11:04:03 +00:00
|
|
|
class TwitterDatabase < OmniAuth::Strategies::Twitter
|
|
|
|
option :name, 'twitter'
|
|
|
|
|
|
|
|
def initialize(app, *args, &block)
|
|
|
|
|
|
|
|
# database lookup
|
|
|
|
# puts 'TwitterDatabase -> initialize'
|
|
|
|
config = Setting.get('auth_twitter_credentials') || {}
|
2015-05-04 14:42:00 +00:00
|
|
|
args[0] = config['key']
|
|
|
|
args[1] = config['secret']
|
2012-11-18 11:04:03 +00:00
|
|
|
super
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|