Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
CakePHP & Facebook Session problems
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
ianjofriel  
View profile  
 More options Aug 18 2012, 6:38 pm
From: ianjofriel <celticcharityf...@gmail.com>
Date: Sat, 18 Aug 2012 15:38:19 -0700 (PDT)
Local: Sat, Aug 18 2012 6:38 pm
Subject: CakePHP & Facebook Session problems

Hi

Im currently developing an app in Cake 2.2.1, with Facebook integration via
the official Facebook SDK.

When a user logs in, I have a few functions in AppController.php to attempt
to get the logged in users details via the facebook->api('/me'); method in
a try...catch block, which allows me to determine whether the user has
granted permissions to the FB app associated with the site.

The function is called in the beforeFilter() of the AppController, and a
message is set via the setFlash method, inviting the user to join if need
be.

The problem however...

If a user hasnt given permission, then there are no fb_xxxxxx_ variables
set in $_SESSION as you would expect, and when the user goes through the
authorisation process, and gives the app permission, they are returned back
to a callback page on the site, this does some db checks, etc and redirects
the user to the index page.

You would now expect, the $_SESSION would have fb_APPID_user_id,
fb_APPID_code, fb_access_token set, however, they are not, the user is
therefore still prompted as before, as if they were a non app-user. Now, if
the user either navigates to another page, or hits refresh on the current
page, the variables appear as expected.

The same happens in reverse, when a user revokes the permissions, and you
go to a page on the site, the fb_APPID_ variables are still set in
$_SESSION, you then have to either navigate AGAIN, or hit refresh AGAIN,
before the changes take effect.

Does anyone either have any suggestions, or have suffered this issue before
with $_SESSION not refreshing ?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mathias R  
View profile  
 More options Jan 9, 8:36 am
From: Mathias R <frechda...@planet-smart-radio.de>
Date: Wed, 9 Jan 2013 05:36:25 -0800 (PST)
Local: Wed, Jan 9 2013 8:36 am
Subject: Re: CakePHP & Facebook Session problems

hi,

did you solved this problem? i have same error now and i don't know how to
fix it.

greetings
m.

Am Sonntag, 19. August 2012 00:38:19 UTC+2 schrieb ianjofriel:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions