Page 1 of 1

Facebook login

Posted: Tue Aug 18, 2015 6:56 am
by jane

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...


Facebook login

Posted: Tue Aug 18, 2015 4:01 pm
by Evgene Karachevtsev

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?


Facebook login

Posted: Wed Aug 19, 2015 1:12 am
by jane

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.


Facebook login

Posted: Fri Aug 21, 2015 12:03 pm
by Joe Sharples

doFbLogin(); on button click should run the function