을 정의 그래서에서 페이스 북 로그인 통합에 대한 자습서를 찾을 수 없습니다페이스 북 로그인 기능
Uncaught TypeError: object is not a function index.php:53 onclick
http://www.excellencemagentoblog.com/facebook-login-integration-website
을 나는 말을 Facebook Login
을 클릭 한 후 나에게 오류를 제공 스텝과 구글의 Chromes 개발자 도구에 의해 단계 다음
버튼의 HTML은 다음과 같이이다 :
이<a class="btn btn-success" href='#' onclick='login();'>
<i class="icon-facebook"></i>
Facebook Login
</a>
스크립트는 다음과 같다 s, 나는 함수가 스크립트 내에서 정의 되었기 때문에 무엇이 잘못되었는지를 정말로 알 수 없다. 당신이 여기에서 발생하는 문제도 확인
<script type="text/javascript">
window.fbAsyncInit = function() {
FB.init({
appId : ' 163289720517425', // App ID
channelURL : '', // Channel File, not required so leave empty
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
oauth : true, // enable OAuth 2.0
xfbml : false // parse XFBML
});
};
// logs the user in the application and facebook
function login(){
FB.getLoginStatus(function(r){
if(r.status === 'connected'){
window.location.href = 'php/fbconnect.php';
}else{
FB.login(function(response) {
if(response.authResponse) {
//if (response.perms)
window.location.href = 'php/fbconnect.php';
} else {
// user is not logged in
}
},{scope:'email'}); // which data to access from user profile
}
});
}
// Load the SDK Asynchronously
(function() {
var e = document.createElement('script'); e.async = true;
e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
document.getElementById('fb-root').appendChild(e);
}());
</script>
PHP SDK를 설치 했습니까? – KyleK