mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-11-29 10:33:16 +00:00
fbpost: Now groups and pages can be mirrored as well
This commit is contained in:
parent
f6d9ced311
commit
88638d2338
1 changed files with 5 additions and 2 deletions
|
@ -1008,10 +1008,13 @@ function fbpost_cron($a,$b) {
|
||||||
|
|
||||||
function fbpost_fetchwall($a, $uid) {
|
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');
|
||||||
$lastcreated = get_pconfig($uid,'facebook','last_created');
|
$lastcreated = get_pconfig($uid,'facebook','last_created');
|
||||||
$lastcreated = "";
|
|
||||||
|
|
||||||
$url = 'https://graph.facebook.com/me/feed?access_token='.$access_token;
|
if ((int)$post_to_page == 0)
|
||||||
|
$post_to_page = "me";
|
||||||
|
|
||||||
|
$url = "https://graph.facebook.com/".$post_to_page."/feed?access_token=".$access_token;
|
||||||
|
|
||||||
if ($lastcreated != "")
|
if ($lastcreated != "")
|
||||||
$url .= "&since=".urlencode($lastcreated);
|
$url .= "&since=".urlencode($lastcreated);
|
||||||
|
|
Loading…
Reference in a new issue