How to post like with ajax to instagram? Help me please
===

i have this code but its not working. it says to me ajax post is  success but when i look make refresh i saw its not liked.



    <? if ($data->user_has_liked == false) { ?>
    <a href="#" id="<?=$data->id;?>" class="like"><span class="<?=$data->id;?>">Like</span></a>
    <? } else { echo 'Liked'; } ?>
    <script type="text/javascript">
    
            $('a.like').click(function() {
             
                var mediaId = $(this).attr('id');
                $.ajax({
                    url: "https://api.instagram.com/v1/media/" + mediaId + "/likes?callback=?",
                    dataType: "jsonp",
                    data: {
    					access_token: '<?=$access_token;?>',
    					_method: 'POST'
                    },
                    type: "POST",
                    success: function(data, textStatus, jqXHR) {
    				  $("."+mediaId+"").text('Liked');
                    },
                    error: function(jqXHR, textStatus, errorThrown) {
                         $("."+mediaId+"").text('Error!<br/>' + textStatus + ' - ' + errorThrown);
                   }
                 });
            });
     
     
    
    
    
    </script>