Facebook Connect Cookie/Session issue

gieeeniu

New Member
I am using the following 2 API's to create a facebook connect but having issues with the sessions being picked up the the PHP SDK. I have downloaded the latest facebook-connect-js & facebook-php-sdkHere is my initial FB.init connect using the JS no problem ie.\[code\]<script> // initialize the library with the API key FB.init({ apiKey: '9999999999999999999999999999', session : <?php echo json_encode($session); ?>, status : true, // check login status cookie : true, // enable cookies to allow the server to access the session xfbml : true // parse XFBML }); $('#login').bind('click', function() { FB.login(handleSessionResponse); });\[/code\]I can test if its working by reloading the page an using the following script I can see the response session.\[code\] FB.getLoginStatus(function(response) { if (response.session) { console.log(response.session) } else { // no user session available, someone you dont know } });\[/code\]But the PHP SDK is not picking up the session.ie\[code\]$facebook = new Facebook(array( 'appId' => '9999999999999999', 'secret' => '9999999999999999999999999999999', 'cookie' => true,)); $session = $facebook->getSession();\[/code\]The javascript is creating a cookie but its not being found by the session.Any suggestions to what I am doing wrong.Hope you can help.
 
Back
Top