Feature: Twitter DM Integration (#451)

An initial version of twitter integration

Co-authored-by: Sojan Jose <sojan@pepalo.com>
This commit is contained in:
Pranav Raj S
2020-02-03 00:39:00 +05:30
committed by GitHub
parent a287c86bc4
commit a9c304f1ef
20 changed files with 406 additions and 49 deletions

View File

@@ -0,0 +1,8 @@
$twitter = Twitty::Facade.new do |config|
config.consumer_key = ENV.fetch('TWITTER_CONSUMER_KEY', nil)
config.consumer_secret = ENV.fetch('TWITTER_CONSUMER_SECRET', nil)
config.access_token = ENV.fetch('TWITTER_ACCESS_TOKEN', nil)
config.access_token_secret = ENV.fetch('TWITTER_ACCESS_TOKEN_SECRET', nil)
config.base_url = 'https://api.twitter.com'
config.environment = 'chatwootstaging'
end

View File

@@ -110,6 +110,9 @@ Rails.application.routes.draw do
end
mount Facebook::Messenger::Server, at: 'bot'
get 'webhooks/twitter', to: 'api/v1/webhooks#twitter_crc'
post 'webhooks/twitter', to: 'api/v1/webhooks#twitter_events'
post '/webhooks/telegram/:account_id/:inbox_id' => 'home#telegram'
# Routes for testing