Making sure that really only public postings are relayed.
This commit is contained in:
parent
6370953286
commit
1bb89d2030
|
@ -991,11 +991,15 @@ function fbpost_fetchwall($a, $uid) {
|
||||||
|
|
||||||
$access_token = get_pconfig($uid,'facebook','access_token');
|
$access_token = get_pconfig($uid,'facebook','access_token');
|
||||||
$post_to_page = get_pconfig($uid,'facebook','post_to_page');
|
$post_to_page = get_pconfig($uid,'facebook','post_to_page');
|
||||||
|
$mirror_page = get_pconfig($uid,'facebook','mirror_page');
|
||||||
$lastcreated = get_pconfig($uid,'facebook','last_created');
|
$lastcreated = get_pconfig($uid,'facebook','last_created');
|
||||||
|
|
||||||
if ((int)$post_to_page == 0)
|
if ((int)$post_to_page == 0)
|
||||||
$post_to_page = "me";
|
$post_to_page = "me";
|
||||||
|
|
||||||
|
if ((int)$mirror_page != 0)
|
||||||
|
$post_to_page = $mirror_page;
|
||||||
|
|
||||||
$url = "https://graph.facebook.com/".$post_to_page."/feed?access_token=".$access_token;
|
$url = "https://graph.facebook.com/".$post_to_page."/feed?access_token=".$access_token;
|
||||||
|
|
||||||
$first_time = ($lastcreated == "");
|
$first_time = ($lastcreated == "");
|
||||||
|
@ -1021,7 +1025,8 @@ function fbpost_fetchwall($a, $uid) {
|
||||||
if ($item->application->id == get_config('facebook','appid'))
|
if ($item->application->id == get_config('facebook','appid'))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if(isset($item->privacy) && ($item->privacy->value !== 'EVERYONE') && ($item->privacy->value !== ''))
|
//if(isset($item->privacy) && ($item->privacy->value !== 'EVERYONE') && ($item->privacy->value !== ''))
|
||||||
|
if((isset($item->privacy) && ($item->privacy->value !== 'EVERYONE')) OR !isset($item->privacy))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (($post_to_page != $item->from->id) AND ((int)$post_to_page != 0))
|
if (($post_to_page != $item->from->id) AND ((int)$post_to_page != 0))
|
||||||
|
@ -1091,7 +1096,13 @@ function fbpost_fetchwall($a, $uid) {
|
||||||
$data = json_decode($feed);
|
$data = json_decode($feed);
|
||||||
if (isset($data->images)) {
|
if (isset($data->images)) {
|
||||||
$pagedata["images"][0]["src"] = $data->images[0]->source;
|
$pagedata["images"][0]["src"] = $data->images[0]->source;
|
||||||
logger('fbpost_fetchwall: got fbid image '.$preview, LOGGER_DEBUG);
|
logger('got fbid image from images for '.$item->object_id, LOGGER_DEBUG);
|
||||||
|
} elseif (isset($data->source)) {
|
||||||
|
$pagedata["images"][0]["src"] = $data->source;
|
||||||
|
logger('got fbid image from source for '.$item->object_id, LOGGER_DEBUG);
|
||||||
|
} elseif (isset($data->picture)) {
|
||||||
|
$pagedata["images"][0]["src"] = $data->picture;
|
||||||
|
logger('got fbid image from picture for '.$item->object_id, LOGGER_DEBUG);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user