My WordPress application is hosted on url http://127.0.0.1/wordpress/ and i added following script in WordPress header to get some token but it does not give any token
I copied that url ( http://127.0.0.1:8090/sample/sample/getToken ) and open in new tab it successfully return token but when i called it using $.ajax it does not return me token
<script>
$().ready(function(){
$("#signIn").click(function(){
alert("Display Alert Properly");
$.ajax({
type: "POST",
url: "http://127.0.0.1:8090/sample/sample/getToken",
contentType: "text/html",
success: function(token) {
window.open("https://api.linkedin.com/uas/oauth/authorize?oauth_token=" + token, "_self", ""); });
});
});