diff options
author | Fabio Comuni <fabrix.xm@gmail.com> | 2011-09-05 09:09:34 +0200 |
---|---|---|
committer | Fabio Comuni <fabrix.xm@gmail.com> | 2011-09-05 09:09:34 +0200 |
commit | 0283cbfcd35a29b5689ffbf16439d448de0c7254 (patch) | |
tree | 9fa9aa4b7fb3454ab60d63ad584aafaf20850999 /addon/facebook/facebook.php | |
parent | 058e329dfbc2678fa7e3cb2ce130fb9ffd69b84d (diff) | |
parent | 7e8100d2cd27227435ba6ff421dd3c3d8689930f (diff) | |
download | volse-hubzilla-0283cbfcd35a29b5689ffbf16439d448de0c7254.tar.gz volse-hubzilla-0283cbfcd35a29b5689ffbf16439d448de0c7254.tar.bz2 volse-hubzilla-0283cbfcd35a29b5689ffbf16439d448de0c7254.zip |
Merge remote-tracking branch 'friendika/master' into newui
Diffstat (limited to 'addon/facebook/facebook.php')
-rw-r--r-- | addon/facebook/facebook.php | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/addon/facebook/facebook.php b/addon/facebook/facebook.php index 33895f80d..e8a24070d 100644 --- a/addon/facebook/facebook.php +++ b/addon/facebook/facebook.php @@ -273,6 +273,10 @@ function facebook_post(&$a) { $no_linking = get_pconfig($uid,'facebook','no_linking'); + $no_wall = ((x($_POST,'facebook_no_wall')) ? intval($_POST['facebook_no_wall']) : 0); + set__pconfig($uid,'facebook','no_wall',$no_wall); + + $linkvalue = ((x($_POST,'facebook_linking')) ? intval($_POST['facebook_linking']) : 0); set_pconfig($uid,'facebook','no_linking', (($linkvalue) ? 0 : 1)); @@ -359,12 +363,11 @@ function facebook_content(&$a) { $checked = (($no_linking) ? '' : ' checked="checked" '); $o .= '<input type="checkbox" name="facebook_linking" value="1"' . $checked . '/>' . ' ' . t('Link all your Facebook friends and conversations') . EOL ; - $hidden = (($a->user['hidewall'] || get_config('system','block_public')) ? true : false); - if(! $hidden) { - $o .= EOL; - $o .= t('Warning: Your Facebook privacy settings can not be imported.') . EOL; - $o .= t('Linked Facebook items <strong>may</strong> be publicly visible, depending on your privacy settings for this website/account.') . EOL; - } + $no_wall = get_pconfig(local_user(),'facebook','no_wall'); + $checked = (($no_wall) ? ' checked="checked" ' : ''); + $o .= '<input type="checkbox" name="facebook_no_wall" value="1"' . $checked . '/>' . ' ' . t('Do not link your Facebook profile wall posts - as these could be visible to people that would not be able to see them on Facebook.') . EOL ; + + $o .= '<input type="submit" name="submit" value="' . t('Submit') . '" /></form></div>'; } @@ -766,12 +769,13 @@ function fb_consume_all($uid) { if(! $access_token) return; - - $s = fetch_url('https://graph.facebook.com/me/feed?access_token=' . $access_token); - if($s) { - $j = json_decode($s); - logger('fb_consume_stream: wall: ' . print_r($j,true), LOGGER_DATA); - fb_consume_stream($uid,$j,true); + if(! get_pconfig($uid,'facebook','no_wall')) { + $s = fetch_url('https://graph.facebook.com/me/feed?access_token=' . $access_token); + if($s) { + $j = json_decode($s); + logger('fb_consume_stream: wall: ' . print_r($j,true), LOGGER_DATA); + fb_consume_stream($uid,$j,true); + } } $s = fetch_url('https://graph.facebook.com/me/home?access_token=' . $access_token); if($s) { |