Skip to content

Commit 6b6c352

Browse files
illyaVvengrov
authored andcommitted
fix (facebook login): pass facebook permissions options (#41)
1 parent 1f82b24 commit 6b6c352

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

libs/backendless.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1860,14 +1860,17 @@
18601860
});
18611861
},
18621862

1863-
loginWithFacebookSdk: function(fieldsMapping, stayLoggedIn, async) {
1863+
loginWithFacebookSdk: function(fieldsMapping, stayLoggedIn, options, async) {
18641864
if (!FB) {
18651865
throw new Error("Facebook SDK not found");
18661866
}
18671867

18681868
if (stayLoggedIn instanceof Async) {
18691869
async = stayLoggedIn;
18701870
stayLoggedIn = false;
1871+
} else if (options instanceof Async) {
1872+
async = options;
1873+
options = undefined;
18711874
}
18721875

18731876
var me = this;
@@ -1877,7 +1880,7 @@
18771880
} else {
18781881
FB.login(function(response) {
18791882
me._sendSocialLoginRequest(me, response, "facebook", fieldsMapping, stayLoggedIn, async);
1880-
});
1883+
}, options);
18811884
}
18821885
});
18831886
},

0 commit comments

Comments
 (0)