title: Facebook canvas PHP SDK getLoginUrl
body: <p>i am runnig a site with PHP-SDK connection to the Facebook. I can figure out, what is wrong:</p>
  
  <ol>
  <li>New user comes to the mysite url and uses a button to log in using facebook.</li>
  <li>Facebook asks for permisions. User accepts.</li>
  <li>All i sok.</li>
  </ol>
  
  <p>But:</p>
  
  <ol>
  <li>New user comes to the Facebok Canvas application and uses a button to log in using facebook (I do not use the Javascript and donť want to.).</li>
  <li>Nothing happens, it seems that facebook calls the url (getLoginUrl) but it doesn't show the page, where user can allow the permission.</li>
  </ol>
  
  <p>I use:</p>
  
  <pre><code>  $params = array(
                'canvas' =&gt; 1,
                'fbconnect' =&gt; 0,
                'scope' =&gt; 'user_about_me, email, publish_stream, read_stream',
                'redirect_uri' =&gt; http:/my_domain.com,
                'display' =&gt; 'page'
              );
     $loginUrl = $facebook-&gt;getLoginUrl($params);
  </code></pre>
  
  <p>I tried to use:</p>
  
  <pre><code>             'redirect_uri' =&gt; 'http://apps.facebook.com/app_namespace/',
  </code></pre>
  
  <p>But it doesn't work, either. Anybody any ideas?</p>
  
  <p>Thanks a lot...</p>
  
  <p><strong>EDITED:</strong> I tried to use javascript: top.location.href = ... it works, but only if I use as redirect_uri - htttp://domain.com, so the user is no longer in facebook canvas application :( I think it is possible that I use it wrong way...</p>