I am using the latest versions of both JavaScript(2.0) and PHP(4.0) Facebook SDKs, together. My app id and secrect are set up for both. I am also developing locally, if that might be the issue.
MY Javascript SDK succesfully retrieves a users profile from FB. It also succesfully creates a cookie. The user profile information IS inside the cookie, I can access the cookie from JS but now I need to use PHP with the information.
https://developers.facebook.com/docs/php/FacebookJavaScriptLoginHelper/4.0.0 Facebook says you can access your JS SDK information from PHP using FacebookJavaScriptLoginHelper.
$helper = new FacebookJavaScriptLoginHelper();
$session = $helper->getSession();
This returns null. I have also set up my PHP SDK following: https://developers.facebook.com/docs/php/gettingstarted/4.0.0
My code doesn't seem to show any errors at all, and all my PHP FB Objects are valid. There is only a couple solutions to this issue on the internet, and this one is the closest: Facebook Login: How to combine JavaScript with PHP SDK?
But the code is depreciated and does not work at all. Facebook class doesn't exist in the new versions of the SDK's and I was wondering if anyone knows how to access the SDK data from PHP?