jane
Posts: 0
Joined: Tue Apr 28, 2015 8:48 am

Facebook login

Hi
I follow this tutorial:https://www.youtube.com/watch?t=1722&...
but how do i invoke the javascript to the facebook button?
I have seen the documentation to : https://devcenter.appery.io/documenta...

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Facebook login

Hello Jane,

Sorry I'm not sure I understand you correctly, could you please clarify your question with more details? What js do you want to invoke to the button?

jane
Posts: 0
Joined: Tue Apr 28, 2015 8:48 am

Facebook login

This javascript:
function doFbLogin(){

Code: Select all

 Apperyio.User.loginFB("facebook id", "[url=http://appery.io/app/view/").then(function(token)]http://appery.io/app/view/").then(fun...[/url]{ 

     console.log("success_" + token); 
     Apperyio.storage.token.set(token); 
     Apperyio.naviagetTo("CPanelLogin"); 

}, function(error) {
alert("error_" + JSON.stringify(error));
});
}

I created a javascript on my app. but how do i invoke it to my button so that when I click on the 'login with facebook' button it will lead the user to the facebook to request for permission and redirect them back to the app.

Joe Sharples
Posts: 0
Joined: Mon Aug 18, 2014 1:31 pm

Facebook login

doFbLogin(); on button click should run the function

Return to “Issues”