var myUpload = document.getElementById('canvas2'); urldata=myUpload.toDataURL("image/png"); FB.api('/photos', 'POST', { message: 'testing Graph API photo', access_token: accessToken, url: urldata, no_story:true }, function (response) { if (!response || response.error) { console.log('Error occured:' + response.error.message); } else { alert('Post ID: ' + response.id); } } );
Response -" Error occured:(#324) Missing or invalid image file "
I found a gist: https://gist.github.com/nseo/2910244
but I can't seem to implement it.
var myUpload = document.getElementById('canvas2'); urldata=myUpload.toDataURL("image/png"); FB.api('/photos', 'POST', { message: 'testing Graph API photo', access_token: accessToken, url: urldata, no_story:true }, function (response) { if (!response || response.error) { console.log('Error occured:' + response.error.message); } else { alert('Post ID: ' + response.id); } } );Response -" Error occured:(#324) Missing or invalid image file "
I found a gist: https://gist.github.com/nseo/2910244
but I can't seem to implement it.