0
我使用一个Facebook应用程序,以我的用户进行身份验证,但如果用户没有登录Facebook的(我与FB.getLoginStatus()
检查它)我告诉他一个按钮来登录。问题是弹出窗口一直被阻塞。我不知道为什么,因为我在ng-click
上注册Facebook日志。Facebook登录弹出阻止
<button type="button" ng-click="login()">Log in via Facebook</button>
...
$scope.login = function() {
FB.getLoginStatus(function(response) {
if (response.status === 'connected') {
$scope.userId = response.authResponse.userID
loginSuccess()
} else
FB.login(function(response) {
if (response.authResponse) {
$scope.userId = response.authResponse.userID
loginSuccess()
} else {
alert('You need to log in and authorize the app, otherwise you won\'t be able to take the quiz!')
}
})
})
}
任何帮助?
在他的防守我想的SDK的基本工作的例子之一使用片断像一个上面显示的最短可行的登录代码 - 这是不适合所提到的原因,真正的应用程序但在你的回答中 – Igy 2014-10-20 22:04:11