To call a java class from javascipt and pass a variable to the java servelet too
function login(response, info){
if (response.authResponse) {
var accessToken = response.authResponse.accessToken;
userInfo.innerHTML = '<img src="https://graph.facebook.com/' + info.id + '/picture">' + info.name
+ "<br /> Your Access Token: " + accessToken;
button.innerHTML = 'Logout';
showLoader(false);
}
}
I have to pass the access token to a java servlet or java class how to do it
(UserService.java)
Re: To call a java class from javascipt and pass a variable to the java servelet too
To servlet: call a URL of the servlet and pass the parameter either by POST or GET.