I'm using Ajax to submit hybridauth, but the submission is failing straight off, has anyone tried anything like this before? See below for code examples.
(login.php is unaltered but send results to handler file that send the results back on success)
$(".socialClient").click(function(){
var socID = $(this).attr("id"); //the ID for the social media provider image is the name of the provider
$.ajax({
type: "GET",
url: "hybridauth/login.php",
cache: false,
data: {provider:socID},
//enctype: "multipart/form-data",
dataType: "text",
success: function(data){
//handle response, user info and such
},
error:function (xhr, ajaxOptions, thrownError){
alert("Social media logon failed. Error code:" +thrownError);
}
});
});