Facebook post with local photo and description text

In my app, I would love to be able to make a post to Facebook with both a local photo and some description text. If this would be technically possible, I would love to see it in the facebook plugin. This would enable Corona apps to have a better chance of getting viral shares…

Facebook is making it more challenging to do that. Currently, you have to use the showDialog() API, but I’m pretty sure you have to have the photo uploaded so you can get a URL to it for the dialog to work.

All of this is technically possible. Here is the code I’m using in an app:

local function facebookShareDialog() local shareParams = { link = "https://www.mygame.com/", title = "My Awesome Game", picture = "https://www.mygame.com/images/socialMedia.png", } facebook.showDialog( "link", shareParams ) end

Corona has a network.upload() API, but it requires a particular server script to work. Most webserver upload scripts are based on MIME  encoded POST based methods. You can MIME / Base64 encode the file, upload it to the server where the server script can convert it back to a binary image and put it at a location where it can be gotten via a URL.

Rob

Yea, currently I am uploading the image to my server and using the URL to it. However it’s slower and seems like a crusty hack.

Also, including a description text doesn’t seem to work when I do this.

Facebook is making it more challenging to do that. Currently, you have to use the showDialog() API, but I’m pretty sure you have to have the photo uploaded so you can get a URL to it for the dialog to work.

All of this is technically possible. Here is the code I’m using in an app:

local function facebookShareDialog() local shareParams = { link = "https://www.mygame.com/", title = "My Awesome Game", picture = "https://www.mygame.com/images/socialMedia.png", } facebook.showDialog( "link", shareParams ) end

Corona has a network.upload() API, but it requires a particular server script to work. Most webserver upload scripts are based on MIME  encoded POST based methods. You can MIME / Base64 encode the file, upload it to the server where the server script can convert it back to a binary image and put it at a location where it can be gotten via a URL.

Rob

Yea, currently I am uploading the image to my server and using the URL to it. However it’s slower and seems like a crusty hack.

Also, including a description text doesn’t seem to work when I do this.