【发布时间】:2010-12-28 07:54:12
【问题描述】:
我的 WordPress 应用程序托管在 url http://127.0.0.1/wordpress/ 上,我在 WordPress 标头中添加了以下脚本以获取一些令牌,但它没有提供任何令牌
我复制了那个 url (http://127.0.0.1:8090/sample/sample/getToken) 并在新选项卡中打开它成功返回令牌但是当我使用 $.ajax 调用它时它不返回我令牌
<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", ""); });
});
});
【问题讨论】:
标签: javascript jquery ajax wordpress