X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=addon%2Ftwitter%2Ftwitter.php;h=b1c8a0a897a3b388663b39d82f1ba7d452a8a9a9;hb=bdd71b10bef1aa03961fb9c0e2b95c36e9acb096;hp=c3fbc3e648677d3dc3d5575ca63755f0647d142c;hpb=b9cd244dd9980a1103f36ce960b62189bef144eb;p=friendica.git diff --git a/addon/twitter/twitter.php b/addon/twitter/twitter.php index c3fbc3e648..b1c8a0a897 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');