title: Auto post facebook fan page with fan page name PHP SDK 3.2.2
body: <p>I have used this code for auto post on my facebook fan page</p>
  
  <pre><code>&lt;?php
  
  // Requires Facebook PHP SDK 3.0.1: https://github.com/facebook/php-sdk/
  require ('facebook.php');
  
  define('FACEBOOK_APP_ID',"YOUR-APP-ID");
  define('FACEBOOK_SECRET',"YOUR-APP-API-SECRET");
  
  $user = null;
  
  $facebook = new Facebook(array(
      'appId' =&gt; FACEBOOK_APP_ID,
      'secret' =&gt; FACEBOOK_SECRET,
      'cookie' =&gt; true
  ));
  
  $user = $facebook-&gt;getUser(); // Get the UID of the connected user, or 0 if the Facebook user is not connected.
  
  if($user == 0) {
  
      /**
       * Get a Login URL for use with redirects. By default, full page redirect is
       * assumed. If you are using the generated URL with a window.open() call in
       * JavaScript, you can pass in display=popup as part of the $params.
       * 
       * The parameters:
       * - redirect_uri: the url to go to after a successful login
       * - scope: comma separated list of requested extended perms
       */
  
      $login_url = $facebook-&gt;getLoginUrl($params = array('scope' =&gt; "publish_stream"));
  
      echo ("&lt;script&gt; top.location.href='".$login_url."'&lt;/script&gt;");
  
  } else {
  
      try {
              $params = array(
                  'message'       =&gt;  "Hurray! This works :)",
                  'name'          =&gt;  "This is my title",
                  'caption'       =&gt;  "My Caption",
                  'description'   =&gt;  "Some Description...",
                  'link'          =&gt;  "http://stackoverflow.com",
                  'picture'       =&gt;  "http://i.imgur.com/VUBz8.png",
              );
  
              $post = $facebook-&gt;api("/$user/feed","POST",$params);
  
              echo "Your post was successfully posted to UID: $user";
  
          }
          catch (FacebookApiException $e) {
             $result = $e-&gt;getResult();
          }
  
  }
  
  ?&gt;
  </code></pre>
  
  <p>But I need to post on my facebook fan page with my fan page name, this scrpit work so good but this code post on my fan page with my admin account and not like my fan page.</p>
  
  <p>PLZ HELP ME :(</p>