diff --git a/controllers/auth.php b/controllers/auth.php index 837cbe0..de6c8c5 100644 --- a/controllers/auth.php +++ b/controllers/auth.php @@ -256,6 +256,14 @@ $app->post('/auth/reset', function() use($app) { }); $app->post('/auth/twitter', function() use($app) { + if(!Config::$twitterClientID) { + $app->response()['Content-type'] = 'application/json'; + $app->response()->body(json_encode(array( + 'result' => 'error' + ))); + return; + } + if($user=require_login($app, false)) { $params = $app->request()->params(); // User just auth'd with twitter, store the access token @@ -284,6 +292,14 @@ function getTwitterLoginURL(&$twitter) { } $app->get('/auth/twitter', function() use($app) { + if(!Config::$twitterClientID) { + $app->response()['Content-type'] = 'application/json'; + $app->response()->body(json_encode(array( + 'result' => 'error' + ))); + return; + } + $params = $app->request()->params(); if($user=require_login($app, false)) { diff --git a/views/settings.php b/views/settings.php index 0f2c5e3..be01303 100644 --- a/views/settings.php +++ b/views/settings.php @@ -88,11 +88,11 @@ - -

Twitter

-

Connecting a Twitter account will automatically "favorite" and "retweet" tweets on Twitter when you favorite and retweet a Twitter URL in Quill.

- - + +

Twitter

+

Connecting a Twitter account will automatically "favorite" and "retweet" tweets on Twitter when you favorite and retweet a Twitter URL in Quill.

+ +

Backwards Compatibility

@@ -133,6 +133,7 @@