diff options
author | Friendika <info@friendika.com> | 2011-08-14 04:26:41 -0700 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-08-14 04:26:41 -0700 |
commit | bbd545b9caa278d61ad423725dc591b3eb0e61f7 (patch) | |
tree | b4e8da86ec53e26eeeb0eb31f3a60dd7aa966492 /addon/facebook | |
parent | 025485ea69a8c40ae0357987c285c47d51a7b284 (diff) | |
download | volse-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.php | 7 |
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, |