I use the code from the SampleCode that comes with Corona Simulator (the project called “Facebook”)
Everything works just fine untill I ´m trying to post from system.TemporaryDirectory
I have done this many times before but now it seems like FB has updated the developer API
[lua]
local attachment = {
name = “Your image is now on your Facebook page”,
link = “https://www.facebook.com/pages/3Claws-Games/419060951520798”,
caption = “Visit 3Claws on Facebook”,
description = “My Image on FearCam.”,
source = { baseDir= system.TemporaryDirectory, filename=“imageForFb.jpg”, type=“image” },
--picture = “http://www.coronalabs.com/links/demo/Corona90x90.png”,
actions = json.encode( { { name = “My Image”, link = “http://3claws.org” } } )
}
facebook.request( “me/feed”, “POST”, attachment )
[/lua]
IT WORKS IF I COMMENT OUT THE source VARIABLE AND USE picture VARIABLE INSTEAD
BUT I HAVE TO PICK FROM THE TemporaryDirectory FOLDER
I have seen the use of type=“photo” as the last arg in the source variable and the facebook.request could maybe be “me/photo” or some other value but then again it wouldn´t be a feed on the users wall i guess…
I have red all I could find on dev facebook API pages, but I cant find the solution.