Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <ol> <li>Application will need to ask you for <code>manage_pages</code> &amp; <code>publish_stream</code> permissions. </li> <li>Obtain your pages <code>page_access_token</code> from the graph api <code>/accounts</code> call. Each page you own will have its own token listed. This token can be saved to database or accessed at the time of need. It is not recommended to expose or share this token. </li> <li>Use "php-sdk" to make the post.</li> </ol> <p>refer to: <a href="http://developers.facebook.com/docs/authentication/" rel="nofollow">http://developers.facebook.com/docs/authentication/</a></p> <p>refer to: <a href="http://developers.facebook.com/docs/reference/php/" rel="nofollow">http://developers.facebook.com/docs/reference/php/</a></p> <p>NOTE: To impersonate the Page when posting to the wall (i.e. post as the Page, and not the current user), you must use a Page access_token with the manage_pages and publish_stream permissions, as described under Page Access Tokens above.</p> <p><em><strong>Example:</strong> Assumes user has installed and initialized php sdk for Facebook</em></p> <hr> <pre><code>&lt;?php if($user){ $vars = array( 'message' =&gt; "message goes here", // you can uncomment below to enable an image with caption and link. //'picture' =&gt; "image", //'link' =&gt; "Link here", //'name' =&gt; "Name here", //'caption' =&gt; "Caption here", 'show_error' =&gt; true, // comment out the access_token array below to post as a user instead of as page. array('access_token' =&gt; YourPageAccessToken) ); $testpost = $facebook-&gt;api('YourPageId/feed', 'post', $vars); } ?&gt; </code></pre> <hr> <blockquote> <p>If you find this answer helpful or is correct please remember to mark it up or mark it as correct, so future users will have an easier time finding answers.</p> </blockquote>
    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