2
我想通過jquery Ajax調用來調用facebook連接。如果我只是使用鏈接,該調用將起作用,但Ajax調用失敗。我是jquery的新手,甚至難以調試它,因爲我所得到的只是一個警告,說錯誤。下面是Ajax調用:OmniAuth不能使用jQuery Ajax調用
$('a.fb_connect_button').click(function() {
$.ajax({
url: 'http://www.nutranation.org/users/auth/facebook',
success: function(data) {
$(".thankyou_box").show();
},
error:function (xhr, ajaxOptions, thrownError){
alert(xhr.statusText);
alert(thrownError);
}
});
})
下面是實際工作的鏈接:<a class="fb_connect_button" href="http://www.nutranation.org/users/auth/facebook">
我在做什麼錯?