Reputation: 1369
I have read over many pages but just can't seem to find the correct way to post to a business facebook page. I can use the code below to post to my wall but unsure how to use this to post to a business page.
$user = $facebook->getUser();
$attachment = array(
'message' => $_GET['message'],
);
// /me/feed/
$result = $facebook->api("/$user/feed/", 'GET', $attachment);
Upvotes: 0
Views: 401
Reputation: 96241
If everyone resp. your precise user is allowed to post on their wall, then just set the id of the page in your API call instead of $user.
Otherwise you’ll have to get a page access token first, and use that in your API call.
Upvotes: 1