Hi there !
I’ve been trying to publish a screenshot made on my app to my Facebook feed with the Facebook plugin.
Just to be clear, I’m not talking about this kind of post :
… but I’m talking about this kind of post :
I felt I had to specify because I’m using the Facebook sample as a template, and the Post Photo button does post a picture, but only the first type.
So, in order to post my picture, I’m using this :
The Facebook login is made with that line :
facebook.login(fbAppID, facebookListener)
Then I add a listener to a button calling this function
facebook.login(fbAppID, facebookListener, {"publish\_actions"})
And I try to upload a picture from the Resource Directory (note that I’m not trying to upload a custom screenshot yet) :
function uploadPictureToFacebook() local attachment = { message="I took a picture !", source= {baseDir=system.ResourceDirectory, filename="images/facebook.png", type="image"} } -- posting the photo facebook.request( "me/photos", "POST", attachment ) end
And… nothing. Everything else works (posting a status, a link, etc…). but this one doesn’t.
Is this actually possible with the Facebook Plugin, because I can’t find much on the forum on this topic ?
Thank you in advance !