Find your content:

Search form

You are here

Facebook toolkit session issue

 
Share

I have created a Facebook app using the toolkit and have seem to run into what seems like a session caching issue. I'll use Pat (@metadaddy)'s test page to illustrate

  • Login to facebook
  • Go to https://testfbtk3-developer-edition.na14.force.com/
  • The page displays your photo and if you have not approved the app then Facebook OAuth dialog appears.
  • Logout of facebook and login as a different user in facebook
  • Relaunch the above URL and you will notice that the page still displays the information of the first user.

Even if you clear the cache, the page still displays the information about the first user which has manifested into a serious problem for my app.

Has anyone found how to fix this problem?


Attribution to: DCBoy

Possible Suggestion/Solution #1

Version 3.3 of the Force.com Toolkit for Facebook fixes this issue by providing a FacebookCheckUser Visualforce component that periodically checks that the current user has a valid Facebook session, and logs them out of the Force.com app if the Facebook session is no longer valid. Usage:

<!-- appId - Facebook Application ID -->
<!-- userId - ID of currently logged in Facebook User -->
<!-- timeout - Timeout, in seconds -->
<c:FacebookCheckUser appId="{!appId}" userId="{!me.id}" timeout="60" />

The new component is in use on the toolkit sample page - try logging in to https://testfbtk3-developer-edition.na14.force.com/ in one browser window, then logging out of Facebook from another window of the same browser. The toolkit sample should log you out within about 5 seconds or so.


Attribution to: metadaddy
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/1293

My Block Status

My Block Content