aboutsummaryrefslogtreecommitdiffstats
path: root/addon/facebook
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-08-14 04:26:41 -0700
committerFriendika <info@friendika.com>2011-08-14 04:26:41 -0700
commitbbd545b9caa278d61ad423725dc591b3eb0e61f7 (patch)
treeb4e8da86ec53e26eeeb0eb31f3a60dd7aa966492 /addon/facebook
parent025485ea69a8c40ae0357987c285c47d51a7b284 (diff)
downloadvolse-hubzilla-bbd545b9caa278d61ad423725dc591b3eb0e61f7.tar.gz
volse-hubzilla-bbd545b9caa278d61ad423725dc591b3eb0e61f7.tar.bz2
volse-hubzilla-bbd545b9caa278d61ad423725dc591b3eb0e61f7.zip
honour "post to xxx network by default" when using API
Diffstat (limited to 'addon/facebook')
-rw-r--r--addon/facebook/facebook.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/addon/facebook/facebook.php b/addon/facebook/facebook.php
index af9829834..47e7691e4 100644
--- a/addon/facebook/facebook.php
+++ b/addon/facebook/facebook.php
@@ -530,6 +530,13 @@ function facebook_post_hook(&$a,&$b) {
$fb_enable = (($fb_post && x($_POST,'facebook_enable')) ? intval($_POST['facebook_enable']) : 0);
$fb_token = get_pconfig(local_user(),'facebook','access_token');
+ // if API is used, default to the chosen settings
+ if($_POST['api_source'] && intval(get_pconfig(local_user(),'facebook','post_by_default')))
+ $fb_enable = 1;
+
+
+
+
logger('facebook: $fb_post: ' . $fb_post . ' $fb_enable: ' . $fb_enable . ' $fb_token: ' . $fb_token,LOGGER_DEBUG);
// post to facebook if it's a public post and we've ticked the 'post to Facebook' box,