Wednesday, 7 June 2017

passport-facebook ajax error

I am trying with passport-facebook ajax

client

$('#fb').click(function(){
         $.ajax({
           url:'/auth/facebook',
           type: 'post',
           success:function(data){
             if(data.result == true){
              ...
             }else{
               ...
             }
           },
           error:function(request,status,error){
                console.log("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error);
           }
           })
    });

error message

XMLHttpRequest cannot load https://www.facebook.com/dialog/oauth?~~~

 ...

Response for preflight is invalid (redirect)

i don't know this error..

help me please



via young

No comments:

Post a Comment