1
에 faceook PHP는 SDK 4.0과 자바 스크립트 SDK에 나는 PHP-SDK와 JS-SDK를 사용 accessToken 이것은 JS가는 laravel
loginController.php
FacebookSession::setDefaultApplication('appid','sec');
$helper = new FacebookJavaScriptLoginHelper();
try {
$session = $helper->getSession();
} catch(FacebookRequestException $ex) {
// When Facebook returns an error
} catch(\Exception $ex) {
// When validation fails or other local issues
}
if ($session) {
// Work!
}
가에서 일을 로그인되어 내 PHP 코드 PHP 세션이
JS 만료 될 때 제 잘 작동이 작동하지 않습니다. 이 I에 대한이 PLS 다시
FB.init
= 내 3시간에
cookie : true,
을 가지고 나의 JS 내가 가진
function Login() {
FB.login(function(response) {
if (response.status === 'connected') {
FB.api('/me', function(data) {
if(data.email == null) {
// Fail
} else {
// OK redirect to .php
window.location.href = "{{ action('[email protected]') }}"
}
});
} else {
// Fail
}
}, {scope: 'public_profile,email'});
}