From: Michael Vogel Date: Tue, 1 Jan 2013 22:38:15 +0000 (+0100) Subject: fbpost: Now groups and pages can be mirrored as well X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=88638d2338e21bd96ad33e0a13eebdfead908925;hp=f6d9ced311a9d6eb6e6d5b23bcf33820127c1016;p=friendica-addons.git fbpost: Now groups and pages can be mirrored as well --- diff --git a/fbpost/fbpost.php b/fbpost/fbpost.php index cdb1f05a..9c2ee0cb 100644 --- a/fbpost/fbpost.php +++ b/fbpost/fbpost.php @@ -1008,10 +1008,13 @@ function fbpost_cron($a,$b) { function fbpost_fetchwall($a, $uid) { $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 = ""; - $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 != "") $url .= "&since=".urlencode($lastcreated);