Post local image to Facebook user and friends wall?

I’m trying to post my game snapshot to user and their friend’s wall.
I test following code to post image to user’s photo album it works fine.

display.save(camera, "snapshot.jpg", system.DocumentsDirectory)  
local attachment = {  
message = "Hello",  
source = { baseDir=system.DocumentsDirectory, filename="snapshot.jpg", type="image" }}   
facebook.request( "me/photos", "POST", attachment )  

But I have no idea when deal with the wall. please help me [import]uid: 133712 topic_id: 24858 reply_id: 324858[/import]

I try to change “me/photos” to “me/feed” it posts message on wall but not photo. any idea?
(I using build 765) [import]uid: 133712 topic_id: 24858 reply_id: 100840[/import]

I tried “me/feed” with an image that I included with my game, but I could not get it to post on wall that way.

Here’s the link to a sample code I use to post an image to the wall (but, for this to work, you’d need a website that you can upload an image that you want to post – and make sure no one else will remove the image from the website unless you want it removed):

https://developer.anscamobile.com/forum/2012/03/20/facebook-login-problem#comment-99268

Edit: The sample code works on both iOS version and Android version.

Naomi

P.S., If anyone knows how to bundle an image that can post using “me/feed”, I’d like to know about it too (and the syntax we need to use for it to work.) [import]uid: 67217 topic_id: 24858 reply_id: 100867[/import]

Thanks, Naomi :slight_smile:

Does BobDickinson’s facebook helper module fixed this problem?

Its possible to uses…

libFacebook.request( "me/feed", "POST", attachment, onRequestComplete )
instead of facebook.request(“me/feed”, “POST”, attachment ) ?

[import]uid: 133712 topic_id: 24858 reply_id: 100877[/import]

You might just want to give it a try? I ended up not using Bob’s helper module because my existing code worked after all. Let me know if it works out for you.

Cheers,
Naomi [import]uid: 67217 topic_id: 24858 reply_id: 100886[/import]

I tried “me/feed” on BobDickinson’s module but no luck.
Message has posted but photo not come along. :\ [import]uid: 133712 topic_id: 24858 reply_id: 101020[/import]

Yeah, I’ve tried many possible syntax, but I could never get a source image to post on wall (not placed in album), so I eventually gave up… Maybe it just isn’t possible at this time.

Naomi [import]uid: 67217 topic_id: 24858 reply_id: 101071[/import]