I have managed to get posts made to a page of which I am admin via the API.
However the problem now is that I can only see the post, it does not show if another page admin logs in or a guest/fan is viewing the page.
The code below is actually working fine but I have included this for reference anyway.
try {
$page_id = 'crystalwear';
// $page_info = $facebook->api("/$page_id?fields=access_token");
// if( $page_info['access_token'] ) {
// echo "Access Token: " . $page_info['access_token'];
$args = array(
'access_token' => '{Page Access Token Here}',
'message' => "Today's Deal only $" . number_format($row[2], 2),
'link' => "link url",
'description' => "Check out our current daily deal. Discounted Costumes/Lingerie Items. You never know what you may find.",
'picture' => "https://{website_url/" . zen_image_mod(DIR_WS_IMAGES . $row[4], $row[0], 177, 265),
);
$post_id = $facebook->api("/$page_id/feed","post",$args);
//}
} catch(FacebookApiException $e){
error_log($e);
}
}
Although the post is successful and shows in my admin feed still Fan's and others cannot see the posts. Anyone have any ideas what would cause this?
same spent hours on net like a nut . remember to check the sandbox option, turn it off it works on me LOL
take a look at Post to page wall as a page via application not visible to others
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With