Develop/Front-End
[FB]페이스북 로그인
RianShin
2020. 6. 23. 11:58
728x90
반응형
SMALL
https://colorscripter.com/s/V0ntYWJ
공유된 코드 - Color Scripter
저작권자 : boarderrian@gmail.com 코드 설명 : facebook login
colorscripter.com
FB.login(function(response){
console.log(JSON.stringify(response, null, 8))
FB.api('/me', {fields: 'email, id'}, function(response) {
response.sns_type = "facebook"
response.email = response.id;
console.log('[FB userInfo]' + JSON.stringify(response, null, 8));
if(response.email === 'undefined'){
//email없을때.
}
else{
//email있을때
}
});
}, {scope: 'public_profile, email'});
728x90
반응형
LIST