Using facebook.showDialog to post to users feed including link and image

I find the facebook plugin really problematic, the double login is odd, and it seems like you need to logout twice as well or something… anyway. i see ppl asking how to post an image to the feed… the image needs to be on the web somewhere, like this;

                local postLink = "https://www.facebook.com/games/wordswithfriends/?fbs=502"                      local params = {                     app\_id = C.fbAppID,                     name = "Name",                     description = "Description",                     caption = "Caption",                     picture = "http://animalia-life.com/data\_images/dog/dog4.jpg",                     link = postLink,                 }                 facebook.showDialog("feed", params)

but how to know if they posted or cancelled?

in the listener, check the event.response field

if they cancelled it will be like this;

“fbconnect://success”

but if they actually posted, like this;

“fbconnect://success?post_id=123456…”

hope that helps someone.

If you’re funding the Facebook plugin problematic, and all you’re trying to do is post a link and image, you may want to consider native.showPopup(). It works on iOS. But unfortunately it is broken on Android, and Corona has not given a timeframe to fix it.

If that would be useful as an alternative – it certainly sounds easier than dealing with your event.response field issues – you may want to join this discussion from (sigh) last year here:

http://forums.coronalabs.com/topic/52755-can-corona-enable-limited-facebook-sharing-on-android-via-nativeshowpopup/

If you’re funding the Facebook plugin problematic, and all you’re trying to do is post a link and image, you may want to consider native.showPopup(). It works on iOS. But unfortunately it is broken on Android, and Corona has not given a timeframe to fix it.

If that would be useful as an alternative – it certainly sounds easier than dealing with your event.response field issues – you may want to join this discussion from (sigh) last year here:

http://forums.coronalabs.com/topic/52755-can-corona-enable-limited-facebook-sharing-on-android-via-nativeshowpopup/