當我的點擊處理程序在客戶端上調用logIn()函數時,我看到一個FB彈出窗口和一個在User集合中創建的記錄,但回調方法從不會被調用。相反,我看到在JS控制檯Parse.com Facebook API的logIn()方法。回調永遠不會被調用
Uncaught TypeError: Cannot read property 'getTime' of null parse-1.2.18.min.js:3
在這裏,下面是我的網頁
設置FB API的代碼
<script>
window.fbAsyncInit = function() {
Parse.FacebookUtils.init({
appId : 757503280935086,
xfbml : true,
version : 'v2.0'
});
};
(function(d, s, id){
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
調用登錄方法
$scope.signupFB = function() {
Parse.FacebookUtils.logIn(null, {
success: function(user) {
//never get here
$timeout(function() {
$rootScope.theUser = user;
$location.path("/properties");
});
},
error: function(user, error) {
$scope.error = "User cancelled the Facebook login or did not fully authorize.";
}
});
}
的FB應用程序已啓用網站「平臺」。
下一次,我試着在我JS控制檯看到
Uncaught Error: Setting authResponse is not supported
。
任何喜悅這個我得到太 –