title: Problem with posting to Facebook Page using PHP script as Page account
body: <p>I am using the following PHP code to post to  my page wall. it is okay I can post successfully as admin but I want to post to the wall using the page name (page account). how do I post using the page name or page id. I tried to find good resource to explain Facebook API function but i did not find good documentation for it.</p>
  
  <pre><code>&lt;?
  
  
  require '../src/facebook.php';
  
  $app_id = "XXX";
  $app_secret = "YYY";
  
  $facebook = new Facebook(array(
   'appId' =&gt; $app_id,
   'secret' =&gt; $app_secret,
   'cookie' =&gt; true
  ));
  
  $user = $facebook-&gt;getUser();
  //echo $user;
  
  if(($facebook-&gt;getUser())==0)
  {
   header("Location:{$facebook-&gt;getLoginUrl(array('req_perms' =&gt; 'user_status,publish_stream,user_photos,offline_access'))}");
   exit;
  }
  else {
  echo "i am connected";
  }
  
  $attachment = array('message' =&gt; 'this is my message',
                  'name' =&gt; 'This is my demo Facebook application!',
                  'caption' =&gt; "Caption of the Post",
                  'link' =&gt; 'example.org',
                  'description' =&gt; 'this is a description',
                  'picture' =&gt; 'http://example.org/image.gif',
                  'actions' =&gt; array(array('name' =&gt; 'Get Search',
                                    'link' =&gt; 'http://www.google.com'))
                  );
  $status = $facebook-&gt;api('/123456789/feed', 'POST', $attachment);   // my page id =123456789
  ?&gt;
  </code></pre>