We are trying to build a facebook application that posts a message from a user to a facebook business page (which the user is NOT an admin of.) We need the post to be from the USER, not the page or the page admin. We are using the facebook PHP SDK and so far have accomplished getting the user's message to post to their own feed. (Using an App Access Token.) Though when we try to post the message to the facebook page (not owned by the user) we get this error:
Fatal error: Uncaught OAuthException: (#200) The user hasn't authorized the application to perform this action thrown in
Is it possible to post to a facebook page, not owned by the user on behalf of the user? We are admins on the facebook page, but if we post using the Page Access Token then the post is no longer authored by the user, but instead the facebook page or page admin.
Here is a snippet of our code to see how we're going about this:
Posting to user's feed as user (works)
$fbpage = "/$fbid/feed";
$attachment = array(
'message' => $msg,'from' => array('name' => $name,'id' => $fbid));
$result = $facebook->api('/'.$fbpage.'?access_token='.$accesstoken, 'post', $attachment);
Posting to facebook page as user (doesn't work)
$fbpage = "/johnsjoint/feed";
$attachment = array('message' => $msg,'from' => array('name' => $name,'id' => $fbid));
$result = $facebook->api('/'.$fbpage.'?access_token='.$accesstoken, 'post', $attachment);