Struggling with Facebook - please help

Hi all
I’m really struggling to implement Facebook integration into my app.
All I would like is for a button on the game over screen that posts a message (I don’t want the user to be able to edit the message) to the users FB wall showing what score they got along with a link to the app store.
I’ve added my FB app id to the build.settings file and I’ve read this page but I just don’t understand the example at all, or where in my code i should put the Facebook.login command.

Is there any chance that someone could possibly explain it in plain english for me please. It really would be appreciated.

Many thanks
Chris [import]uid: 7841 topic_id: 31563 reply_id: 331563[/import]

Here are some posts that might help -

http://docs.coronalabs.com/api/library/facebook/request.html
http://www.coronalabs.com/blog/2011/12/16/uploading-photos-to-facebook-in-corona/
http://www.coronalabs.com/blog/2012/01/04/implementing-facebook-single-sign-on/

I know one of them is uploading photos but might help understand posting to FB better.

Dave [import]uid: 117617 topic_id: 31563 reply_id: 126099[/import]

Cheers Dave, I’d already read all of those, but they just don’t explain things in basic enough language for me to understand (guess I’m just thick :slight_smile: ).
Anyway… I’ve managed to get it working (though I’m not sure how, and I still don’t understand it), but with a problem. When I post just a simple message it all works fine, but if I try to post something like this …
[lua]local fbmsg={
message = “I’ve just scored " … finalscore … " points on StopIt! for the iPhone”,
name = “StopIt!”,
caption = “Available now for iPhone and iPad”,
link = “http://itunes.apple.com/gb/app/stopit!/id502839079?ls=1&mt=8”,
picture = “http://www.aquietspace.org/pics/stopitFB.png
}
facebook.request(“me/feed”, “POST”, fbmsg )[/lua]
… all it posts is the message without the other gubbins.
I would like it to display the image as obviously this is more noticeable and helps draw attention to the app.
Any more suggestions anyone?

Cheers
Chris [import]uid: 7841 topic_id: 31563 reply_id: 126281[/import]

Here are some posts that might help -

http://docs.coronalabs.com/api/library/facebook/request.html
http://www.coronalabs.com/blog/2011/12/16/uploading-photos-to-facebook-in-corona/
http://www.coronalabs.com/blog/2012/01/04/implementing-facebook-single-sign-on/

I know one of them is uploading photos but might help understand posting to FB better.

Dave [import]uid: 117617 topic_id: 31563 reply_id: 126099[/import]

Here is my code for posting a image -

local attachment = {  
message = "Created in Character Creations on " .. system.getInfo("model"),  
source = { baseDir=system.DocumentsDirectory, filename="charactercreations.jpg", type="image" }  
}  
  
facebook.request( "me/photos", "POST", attachment )  

But am uploading a image, not posting a message to the wall.

Dave [import]uid: 117617 topic_id: 31563 reply_id: 126339[/import]

Cheers Dave, I’d already read all of those, but they just don’t explain things in basic enough language for me to understand (guess I’m just thick :slight_smile: ).
Anyway… I’ve managed to get it working (though I’m not sure how, and I still don’t understand it), but with a problem. When I post just a simple message it all works fine, but if I try to post something like this …
[lua]local fbmsg={
message = “I’ve just scored " … finalscore … " points on StopIt! for the iPhone”,
name = “StopIt!”,
caption = “Available now for iPhone and iPad”,
link = “http://itunes.apple.com/gb/app/stopit!/id502839079?ls=1&mt=8”,
picture = “http://www.aquietspace.org/pics/stopitFB.png
}
facebook.request(“me/feed”, “POST”, fbmsg )[/lua]
… all it posts is the message without the other gubbins.
I would like it to display the image as obviously this is more noticeable and helps draw attention to the app.
Any more suggestions anyone?

Cheers
Chris [import]uid: 7841 topic_id: 31563 reply_id: 126281[/import]

Here is my code for posting a image -

local attachment = {  
message = "Created in Character Creations on " .. system.getInfo("model"),  
source = { baseDir=system.DocumentsDirectory, filename="charactercreations.jpg", type="image" }  
}  
  
facebook.request( "me/photos", "POST", attachment )  

But am uploading a image, not posting a message to the wall.

Dave [import]uid: 117617 topic_id: 31563 reply_id: 126339[/import]

This one works for me:

[lua]local fbmsg = {
message=“My zombies travelled “…textUtil.formatNumber(distance)…” feet in Zmbi!”,
name = ‘Zmbi’,
caption = “Beat my high score in Zmbi!”,
description = ‘Fast-paced zombie fun for your iPhone/iPad! Bite people, turn them into zombies and eat brains! Get Zmbi now in the App Store!’,
link = ‘http://goo.gl/OtUwf’,
picture = ‘http://www.gambit.ph/fb/zmbi.png’,
}
facebook.request(“me/feed”, “POST”, fbmsg)[/lua] [import]uid: 144908 topic_id: 31563 reply_id: 128375[/import]

This one works for me:

[lua]local fbmsg = {
message=“My zombies travelled “…textUtil.formatNumber(distance)…” feet in Zmbi!”,
name = ‘Zmbi’,
caption = “Beat my high score in Zmbi!”,
description = ‘Fast-paced zombie fun for your iPhone/iPad! Bite people, turn them into zombies and eat brains! Get Zmbi now in the App Store!’,
link = ‘http://goo.gl/OtUwf’,
picture = ‘http://www.gambit.ph/fb/zmbi.png’,
}
facebook.request(“me/feed”, “POST”, fbmsg)[/lua] [import]uid: 144908 topic_id: 31563 reply_id: 128375[/import]