davidchang / angular-facebook-utils Goto Github PK
View Code? Open in Web Editor NEWAngular Facebook Utils
Angular Facebook Utils
Hi,
I configure some facebook's permissions in the angular-facebook-utils to get the email permission when the user click to login.
But the permission is not sended to the Facebook (o got undefined
).
I fix the error changing the line 110:
from: scope: _self.permissions
to : scope: SDK.permissions
Since the _self variable from SDK doesn't contain the permissions array.
Did someone have this issue too?
ngRoute must be included separately in newer versions of angular. angular-facebook-utils won't work if you don't include angular-route.
Perhaps this should be stated in the README ?
Hi,
Please update the docs. Mention that we have to add
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css">
in the html file.
With out this the directive to create fb login button is always showing the configure app even when we have provided appId in the configuration.
And thanks for the great module. You rock!
Hi,
I keep getting the above mentioned error
angular.js:12520 ReferenceError: facebookUser is not defined
on the line in the eventlistener where I call facebookUser.
$rootScope.$on('fbLoginSuccess', function(name, response) {
facebookUser.then(function(user) {
user.api('/me').then(function(response) {
console.log(response);
if (response.status === 'connected') {
// Logged into your app and Facebook.
$scope.facebooklogin(response.id);
} else if (response.status === 'not_authorized') {
// The person is logged into Facebook, but not your app.
$("#loginWarning").innerHTML = 'Please log ' +
'into this app.';
} else {
// The person is not logged into Facebook, so we're not sure if
// they are logged into this app or not.
$("#loginWarning").innerHTML = 'Please log ' +
'into Facebook.';
}
});
});
});
I link facebookUtils.js after angular and before my app.
This is how I inject the dependancy:
var myApp = angular.module('myApp', ['facebookUtils', 'ngRoute', 'ngSanitize']);
myApp.constant('facebookConfigSettings', {
'appID' : 'myappId'
});
What am I doing wrong? Am I doing anything wrong?
Seems like having multiple elements does not work - only the first to be instantiated will work.
Current workaround can be to only ever have 1 facebook-login button (so keep that button in a nav outside of ng-view), but that's pretty inconvenient.
All work fine in the @localhost, but when I build a cordova android app, the facebook button don't response and it's impossible signin/signout in the mobile app. It's a problem with WebView?
I have 3 different environments so I need to have a variable with the appId.
I use grunt-ng-constant but It does not work with this.
Any idea?
I want to change the look of the facebook login button that you have provided
Hey,
how can I use your lib to ask for permissions on the fly?
Thanks for the easy lib!
It would be really nice to have the router configurable. I use ui.router and would like to use the routingEnabled functionality.
What a great plugin by the way!!
It only redirects me to my login controler and login partial when I'm in Google Chrome in PC, tried also Internet Explorer, and chrome on android. Any ideas how to solve it?
Hi,
i'm trying to the library working but i keep getting the same error. Also, i've dowloaded your code and after i replaced your appID by mine, i got the same error.
Cumps.
[$rootScope:inprog] $digest already in progress
http://errors.angularjs.org/1.5.7/$rootScope/inprog?p0=%24digest
at angular.js:68
at beginPhase (angular.js:17804)
at Scope.$digest (angular.js:17234)
at Scope.$apply (angular.js:17552)
at Object. (facebookUtils.min.js:1)
at Object.v.__wrapper (all.js:88)
at Object.inform (all.js:40)
at la (all.js:85)
at ga (all.js:85)
at Object.ia as getLoginStatus(anonymous function) @ angular.js:13708(anonymous function) @ angular.js:10347$apply @ angular.js:17554(anonymous function) @ facebookUtils.min.js:1v.__wrapper @ all.js:88inform @ all.js:40la @ all.js:85ga @ all.js:85ia @ all.js:85getLoginStatus @ all.js:111(anonymous function) @ all.js:90(anonymous function) @ all.js:88h @ facebookUtils.min.js:1(anonymous function) @ facebookUtils.min.js:1processQueue @ angular.js:16170(anonymous function) @ angular.js:16186$eval @ angular.js:17444$digest @ angular.js:17257$apply @ angular.js:17552(anonymous function) @ angular.js:19383completeOutstandingRequest @ angular.js:5955(anonymous function) @ angular.js:6234
all.js:88 Uncaught Error: [$rootScope:inprog] $digest already in progress
Hi i am using express server, and if i use this, how will i know that the user has signed in? as the session is stored in the backend.
I changed from:
angular.module("facebookUtils", []);
angular.module("angular-facebook-utils").run([ "$templateCache", function($templateCache) {
To:
angular.module("facebookUtils", []);
angular.module("facebookUtils").run([ "$templateCache", function($templateCache) {
And it started working, any ideas about this? Want me to do a pull request?
Regards!
Exclude ngRoute dependency from the module
var application = angular.module("facebookUtils", [ "ngRoute" ])
The routingEnabled option would probably break but for people not using ngRoute this would be an improvement.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.