Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Are you trying to post on a user's wall. If so, from what you have posted there is a mistake. Method should be POST not message. Try the one given below. It should work. Let me know.</p> <pre><code>$sAccessToken = $facebook-&gt;getAccessToken(); $aParams = array( 'access_token' =&gt; $sAccessToken, 'message' =&gt; "Hello, here is a post"; ); $facebook-&gt;api('/OBJECT_ID/feed', 'POST', $aParams); </code></pre> <p>where OBJECT_ID is the Facebook User ID of the user whose wall on which the message need to be posted.</p> <h2>Alternate method</h2> <p>Anyway executing a link in the format given below will definetly work</p> <p><a href="https://graph.facebook.com/OBJECT_ID/feed?method=POST&amp;message=YOUR_MESSAGE&amp;access_token=USER_ACCESS_TOKEN" rel="nofollow">https://graph.facebook.com/OBJECT_ID/feed?method=POST&amp;message=YOUR_MESSAGE&amp;access_token=USER_ACCESS_TOKEN</a></p> <p>where OBJECT_ID is the Facebook User ID of the user whose wall on which the message need to be posted. YOUR_MESSAGE is the message to be published. ACCESS_TOKEN is a valid user access token.</p> <p>A request in above format will publish a post on OBJECT_ID's wall on behalf of the owner of the access token.</p> <h2>Reason for error</h2> <pre><code>{ "error": { "message": "(#200) The user hasn't authorized the application to perform this action", "type": "OAuthException" } } </code></pre> <p>This error occurs when no "publish_stream" permission is granted on the access token. How did you verify that you have the permission.</p> <p>Try this tool to find out whether the permission is granted or not. <a href="https://developers.facebook.com/tools/debug/" rel="nofollow">https://developers.facebook.com/tools/debug/</a> and let me know</p> <h2>HOW TO CREATE POST WITH PAGE AS OWNER?</h2> <p>Facebook GRAPH API allows an application to create a Post with a page as owner instead of a normal Facebook user. For this you need manage_pages and publish_stream extended permissions.</p> <p><strong>STEPS</strong></p> <p>if you know the Facebook ID of the Fan page go to <a href="https://graph.facebook.com/?ids=FAN_PAGE_ID&amp;fields=name,access_token&amp;access_token=ACCESS_TOKEN" rel="nofollow">https://graph.facebook.com/?ids=FAN_PAGE_ID&amp;fields=name,access_token&amp;access_token=ACCESS_TOKEN</a></p> <p>otherwise go to <a href="https://graph.facebook.com/me/accounts&amp;fields=id,name,access_token&amp;access_token=ACCESS_TOKEN" rel="nofollow">https://graph.facebook.com/me/accounts&amp;fields=id,name,access_token&amp;access_token=ACCESS_TOKEN</a></p> <p>after logging in to Facebook.</p> <p>You will get a list of accounts handled by the logged in user or the required Fan page. In that you can find your fan page details along with an access_token. Use that access token instead of the normal user access token. When you create a post with this new access token entries will be created in the name of the page and not as a normal Facebook user.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload