I am using the following code to send a user id when the button with ID #share is pressed. But I don't know how to get data back, a variable, which when is true will run FB.ui.
<script type="text/javascript">
$(document).ready(function(){
$("#share").click(function(){
$.ajax({
type: 'POST',
url: 'upload.php',
data: 'user_id=$user_id',
success: // I don't know what to put here, maybe "function(result){ if (result == true) {"?
FB.ui({
method: 'feed',
name: '$app_name',
link: '$app_url',
picture: '$upload_picture',
caption: 'Aluxian Apps',
description: '$app_description'
});
});
});
});
</script>