$ .post () - Doubt

0

I have a problem:

I have already been able to read and follow the documentation of facebook, use its methods and get some infos that they make available. Now that I've got this, I need to send $ .post () one of these infos (userID).

I can not understand the use of this method in the jQuery documentation. Someone could help me, I already have two days in this problem and I know it is a short time, but as I said, I am not skilful in javascript or in these client side languages.

This is an excerpt of the method I used to display within a div the result of the uid variable that receives userID from the face itself:

FB.getLoginStatus(function(response){

        if (response.status === 'connected'){
            $('#logar').hide();
            $('#status').append('<a href="javascript:void(0);" onclick="logout()" id="logout"></a>');

            var uid = response.authResponse.userID;
            $('#status').html('Seu userID é '+uid+'');              
        } 

    });  

This is what I'm doing to send by $ .post (), saying that the content of the div is the info I'm passing and sending after a click event:

(function facebook(){ 
      $("button").click(function(){
        $.post("url-da-minha-escolha", $("#status"), function(data){
            alert(data);
        } )
    }); 
}); 

Anyway, I've tried other alternatives too .... this was my last attempt. Anyone who can help me or hint or provide more explanatory material already thanks.

    
asked by anonymous 09.02.2017 / 15:00

0 answers