]> git.mxchange.org Git - friendica.git/blobdiff - addon/twitter/twitter.php
Merge pull request #155 from tobiasd/master
[friendica.git] / addon / twitter / twitter.php
index c3fbc3e648677d3dc3d5575ca63755f0647d142c..b1c8a0a897a3b388663b39d82f1ba7d452a8a9a9 100644 (file)
@@ -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');