title: PHP SDK - redirect issue after asking user's permissions
body: <p>I have an application which is in a Facebook fan page's tab.</p>
  
  <p>When a user access to this page's tab, I request to him some permissions.</p>
  
  <p>My issue is that, when the user accept the permissions, he is redirected to <a href="http://apps.facebook.com/" rel="nofollow">http://apps.facebook.com/</a> and not the page's tab.</p>
  
  <p><code>$my_url = "https://apps.facebook.com/&lt;my_app_name&gt;/";</code></p>
  
  <p>If I change my_url value to <a href="http://www.facebook.com/pages/" rel="nofollow">http://www.facebook.com/pages/</a>, then the user is on an infinite loop.</p>
  
  <p>My code:</p>
  
  <pre><code> if (isset($_REQUEST["code"])) {
    $code = $_REQUEST["code"];
   }
   if(empty($code)) {
    // Get permission from the user to manage their Page.
    $dialog_url = "http://www.facebook.com/dialog/oauth?client_id="
      . $app_id . "&amp;redirect_uri=" . urlencode($my_url)
      . "&amp;scope=read_stream";
    echo('&lt;script&gt;top.location.href="' . $dialog_url . '";&lt;/script&gt;');
   } else {
   //my code
   }
  </code></pre>
  
  <p>Thanks.</p>