]> git.mxchange.org Git - friendica-addons.git/blobdiff - facebook/facebook.php
allow facebook_enable to work over api when post_by_default is true
[friendica-addons.git] / facebook / facebook.php
index 6786febbb553e876f155a7020b90999f66960fb5..f977bef90192f469097bc26d3cb729aab93447f9 100644 (file)
@@ -1242,8 +1242,12 @@ function facebook_post_local(&$a,&$b) {
                $fb_enable = (($fb_post && x($_REQUEST,'facebook_enable')) ? intval($_REQUEST['facebook_enable']) : 0);
 
                // if API is used, default to the chosen settings
-               if($_REQUEST['api_source'] && intval(get_pconfig(local_user(),'facebook','post_by_default')))
-                       $fb_enable = 1;
+               // but allow a specific override
+
+               if($_REQUEST['api_source'] && intval(get_pconfig(local_user(),'facebook','post_by_default'))) {
+                       if(! x($_REQUEST,'facebook_enable'))
+                               $fb_enable = 1;
+               }
 
                if(! $fb_enable)
                        return;