我想在我的角度應用程序中實現Facebook登錄。登錄工作正常,但問題是登錄後,我想提醒來自Facebook的數據,但我有問題。用角度登錄後得到facebook的詳細信息
.controller('facebook_login',['$scope', '$ionicModal', '$timeout', 'ngFB', function($scope, $ionicModal, $timeout, ngFB) {
$scope.fbLogin = function() {
ngFB.login({scope: 'email,public_profile,publish_actions'}).then(
function (response) {
if (response.status === 'connected') {
//alert('Facebook login succeeded, got access token: ' + response.authResponse.accessToken);
//$scope.closeLogin();
ngFB.api({
path: '/me',
params: {fields: 'id,name'}
}).then(
function (user) {
$scope.user = user;
alert(params)
});
} else {
alert('Facebook login failed');
}
});
};
}])
你有什麼問題? – ManuKaracho
警報甚至沒有彈出 – neiza