diff --git a/protected/humhub/modules/user/authclient/Twitter.php b/protected/humhub/modules/user/authclient/Twitter.php new file mode 100644 index 0000000000..c446deb467 --- /dev/null +++ b/protected/humhub/modules/user/authclient/Twitter.php @@ -0,0 +1,83 @@ + 860, + 'popupHeight' => 480, + 'cssIcon' => 'fa fa-twitter', + 'buttonBackgroundColor' => '#395697', + ]; + } + + /** + * {@inheritdoc} + */ + public $authUrl = 'https://api.twitter.com/oauth/authenticate'; + + /** + * {@inheritdoc} + */ + public $requestTokenUrl = 'https://api.twitter.com/oauth/request_token'; + + /** + * {@inheritdoc} + */ + public $requestTokenMethod = 'POST'; + + /** + * {@inheritdoc} + */ + public $accessTokenUrl = 'https://api.twitter.com/oauth/access_token'; + + /** + * {@inheritdoc} + */ + public $accessTokenMethod = 'POST'; + + /** + * {@inheritdoc} + */ + public $apiBaseUrl = 'https://api.twitter.com/1.1'; + + public $attributeParams = []; + + /** + * {@inheritdoc} + */ + protected function initUserAttributes() + { + return $this->api('account/verify_credentials.json', 'GET', $this->attributeParams); + } + + /** + * {@inheritdoc} + */ + protected function defaultName() + { + return 'twitter'; + } + + /** + * {@inheritdoc} + */ + protected function defaultTitle() + { + return 'Twitter'; + } +}