aboutsummaryrefslogtreecommitdiffstats
path: root/addon/twitter/twitter.php
diff options
context:
space:
mode:
Diffstat (limited to 'addon/twitter/twitter.php')
-rw-r--r--addon/twitter/twitter.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/addon/twitter/twitter.php b/addon/twitter/twitter.php
index c3fbc3e64..b1c8a0a89 100644
--- a/addon/twitter/twitter.php
+++ b/addon/twitter/twitter.php
@@ -225,6 +225,10 @@ function twitter_post_hook(&$a,&$b) {
$twitter_post = intval(get_pconfig(local_user(),'twitter','post'));
$twitter_enable = (($twitter_post && x($_POST,'twitter_enable')) ? intval($_POST['twitter_enable']) : 0);
+ // if API is used, default to the chosen settings
+ if($_POST['api_source'] && intval(get_pconfig(local_user(),'twitter','post_by_default')))
+ $twitter_enable = 1;
+
if($twitter_post && $twitter_enable) {
logger('Posting to Twitter', LOGGER_DEBUG);
require_once('library/twitteroauth.php');