I would need a persistent login on my site where I am using FB Connect to log in via FB. I use PHP SDK 3. Is there any way how to make persistent login? I think, that I will have to combine PHP SDK and JS SDK, but I have no idea how to do it.
Share
The PHP-SDK example file
with_js_sdk.phpprovides a good start for you:Now depending on your application, you may want to use subscribe to the
auth.authResponseChangeevent to always insure you “know” the latest state of the current user (still logged-in…etc):Or you may choose to check whenever you require an action from the user and in this case you would use the
FB.getLoginStatus()method:Now you always place members related content within
if($user)statement: