Out of curiosity .... when Facebook redirects back to
http:://localhost/app/users/index if you refresh the page at that point is
$this->facebook->getUser() now available?

On Wed, Oct 12, 2011 at 1:12 PM, Kyle <[email protected]> wrote:

> I'm new to all of this, php/cakephp/facebook.  I'm trying to create a
> facebook app but ran into a problem with authentication that I can't
> figure out.  I'm using the facebook php-sdk, after I send the user to
> the facebook loginurl they come back to the page but I still can't get
> the fb user.  If I set the loginurl redirect_uri to a different page
> like users/home then I can get the fb user and everything works fine,
> however I want them to come back to the same page.
>
> This will not get a user:
> $login_url = $this->facebook->getLoginUrl(array(
>        'scope' => 'publish_stream', 'redirect_uri' => '
> http://localhost/app/
> users/index'));
> echo "<script type='text/javascript'>top.location.href =
> '$login_url';</script>";
>
> This will:
> $login_url = $this->facebook->getLoginUrl(array(
>        'scope' => 'publish_stream', 'redirect_uri' => '
> http://localhost/app/
> users/home'));
> echo "<script type='text/javascript'>top.location.href =
> '$login_url';</script>";
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> [email protected] For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to