Ben bağlanmak bir facebook oluşturmak için aşağıdaki 2 API kullanarak ancak oturumları PHP SDK alınıyor ile ilgili sorunlar yaşıyorum. Ben en son facebook-connect-js & indirdiğiniz facebook-php-sdk
İşte benim ilk FB.init js hiçbir sorun yani kullanarak bağlamak.
<script>
// initialize the library with the API key
FB.init({
apiKey: '9999999999999999999999999999',
session : <?php echo json_encode($session); ?>,
status : true, // check login status
cookyani : true, // enable cookyanis to allow the server to access the session
xfbml : true // parse XFBML
});
$('#login').bind('click', function() {
FB.login(handleSessionResponse);
});
Sayfayı yeniden kendi çalışma bir aşağıdaki komut dosyası kullanarak ben cevap oturumu görebilirsiniz eğer ben test edebilirsiniz.
FB.getLoginStatus(function(response) {
if (response.session) {
console.log(response.session)
} else {
// no user session available, someone you dont know
}
});
Ama PHP SDK oturumu toplayıp değildir.
yani
$facebook = new Facebook(array(
'appId' => '9999999999999999',
'secret' => '9999999999999999999999999999999',
'cookyani' => true,
));
$session = $facebook->getSession();
The javascript is creating a cookyani but its not being found by the session.
Ben yanlış yapıyorum ne herhangi bir öneri.
Eğer yardımcı olabilir umuyoruz.