I have a MySQL database that I want to update with a response value that I get when I have uploaded a photo to an album on Facebook with the Facebook .api – JavaScript.
I upload a photo using the code below, and I want to update my database with the response.id that is returned after the upload is finished.
How can I update the database, or how can I put the callback value into an classic .asp variable?
function uploadphoto(){
var imgURL = "http://www....myimage.jpg";
FB.api('/1234xxxxxxxxxxxx/photos/', 'post', {
message:'somemessage',
url:imgURL,
}, function(response){
if (!response || response.error) {
alert('Error occured' +response.error);
} else {
alert('Post uploaded!\nPost ID number: ' + response.id);
}
});
}
Use jQuery