title: how to publish post on facebook page wall as admin using facebook php sdk v4 and graph api 2.x
body: <p>how to publish post on Facebook page wall as page admin user using facebook php sdk v4 and graph api 2.x?</p>
  
  <p>I have spent lot of hours but mostly articles are old(examples with old Facebook PHP SDK) and bit confusing </p>
  
  <p>I have figured out following steps</p>
  
  <p><em>Step 1 : Redirect application to Facebook for logging admin <br>
  Step 2 : Obtain user access token (short lived) <br>
  Step 3 : Obtain user access token(long lived) by exchanging short lived token<br>
  Step 4 : Obtain Page access token</em></p>
  
  <p>Can you explain please which functions of Facebook PHP SDK I need to call for above steps
  or you can give me url of some code example?</p>
  
  <p>OR</p>
  
  <p>If I am wrong then please correct me
  Thanks for advance</p>
  
  <p>=======================<br>
  Note:</p>
  
  <ul>
  <li>I have created application for app_id and app_secret</li>
  <li>I have created Facebook page</li>
  <li>I am using Facebook PHP SDK 4</li>
  <li>Facebook PHP SDK 4 uses graph API 2.x (I assume)</li>
  </ul>