title: APP on redirect_url shows blank page
body: <p>I have a Facebook PHP SDK APP in development phase and i'm stuck on something...
  The logic of the APP is this:</p>
  
  <p>first the user have to like the page (app is on this) // works very well :)
  after that comes the permissions request 
  if permission is granted: the app_data variable is pass through and the user recieves a picture. </p>
  
  <p>app_data variable is necessary because, if the user clicks the app after permission granted again, it gets new picture automaticly. with the app_data don't. </p>
  
  <p>my problem is this link:</p>
  
  <pre><code>    $params = array(
    scope =&gt; 'publish_stream,user_photos',
    redirect_uri =&gt; 'http://www.facebook.com/XXXXX?sk=app_YYYYYY&amp;app_data=1'
      );
  
  &lt;a href="&lt;?php echo $facebook-&gt;getLoginUrl($params); ?&gt;"&gt;Accept&lt;/a&gt;
  </code></pre>
  
  <p>If i click on it, the app shows blank page, and nothing happening... :(
  On direct call, that app runs without any error.</p>
  
  <p>Can someone help me out?</p>
  
  <p>// sorry for my english...</p>
  
  <p>Thank you!</p>
  
  <p>and the whole index.php is:</p>
  
  <p>this is the whole index.php:</p>
  
  <pre><code>&lt;?php
  require 'facebook.php';
  
  $facebook = new Facebook(array(
  'appId' =&gt; 'xxxxx',
  'secret' =&gt; 'yyyyy',
  'baseUrl' =&gt; 'http://hosting.address/',
  'appBaseUrl' =&gt; 'http://apps.facebook.com/app-name/',
  'fileUpload' =&gt; 'true',
  ));
  // Get User ID
  $user = $facebook-&gt;getUser();
  
  $params = array(
    scope =&gt; 'publish_stream,user_photos',
    redirect_uri =&gt; 'http://www.facebook.com/xxxxx?sk=app_yyyyy&amp;app_data=1'
      );
  
  $signed_request = $facebook-&gt;getSignedRequest();
  $app_data = $signed_request["app_data"];
  
  
  ?&gt;
                      &lt;!doctype html&gt;
                      &lt;html xmlns:fb="http://www.facebook.com/2008/fbml"&gt;
                      &lt;head&gt;
                      &lt;title&gt;the title&lt;/title&gt;
                      &lt;style&gt;
                          a:link    {color:#ffffff;}
                          a:visited {color:#ffffff;}
                          a:hover   {color:#ececec;}
                          a:active  {color:#1f1f1f;}
                          a:link    {text-decoration: none}
                      &lt;/style&gt;
                      &lt;/head&gt;
                      &lt;body&gt;
  &lt;?php if ($user){
  
      try {
          $user_profile = $facebook-&gt;api('/me');
          $likes = $facebook-&gt;api("/me/likes/123123123"); //page ID
  
              if( !empty($likes['data']) ){
  
                  $scope = 'publish_stream,user_photos';
                  $scope_params = explode(',',$scope);
  
                  $permissions = $facebook-&gt;api("/me/permissions");
                      if( array_key_exists('publish_stream', $permissions['data'][0]) &amp;&amp;  array_key_exists('user_photos', $permissions['data'][0]) &amp;&amp; isset($app_data)) {
  
  
                          $file = "1.jpg";
                          $message = 'bla bla';
  
                          $ret_obj = $facebook-&gt;api('/me/photos', 'POST', array(
                                                                          'source' =&gt; '@' . $file,
                                                                          'message' =&gt; $message,
                                                                      )
                                                                  );
                          echo "&lt;img width=\"520px\" src=\"1.jpg\" /&gt;";
                      } else {
                      ?&gt;
  &lt;a href="&lt;?php echo $facebook-&gt;getLoginUrl($params); ?&gt;"&gt;accept&lt;/a&gt;&lt;/td&gt;
  &lt;a href="http://www.facebook.com/pageurl"&gt;deny&lt;/a&gt;&lt;/td&gt;
  
                      &lt;?
                      }
              }else{
                  echo "&lt;img width=\"520px\" src=\"no-fan.jpg\" /&gt;";
              }
  
      } catch (FacebookApiException $e) {
          echo '&lt;pre&gt;'.htmlspecialchars(print_r($e, true)).'&lt;/pre&gt;';
          $user = null;
          }
      }
  
      if ($user) {
          } else {
              $loginUrl = $facebook-&gt;getLoginUrl($params);
              echo '&lt;script type="text/javascript"&gt;top.location.href = "'.$loginUrl .'";&lt;/script&gt;';
          }
  
          ?&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>