I am using below code for Facebook login.
function login(){
FB.login(function(response) {
if (response.authResponse) {
FB.api('/me', function(response) {
alert(JSON.stringify(response))
});
} else {
console.log('User did not authorize.');
}
});
}
I am calling login method on click of button.FB.login() call is giving a popup window where user is supposed to enter username and password.
My requirement is to do a silent login i.e. logging in without popup window.My username and pswd are hardcoded for time being.How do i pass the credentials to login API without user intervention.I know hardcoding is not good practice but later i will obtain credentials from user controls.
How do i achieve this.Any help is greatly appreciated.