Advertisement
Hendrix000007

Facebook feed from temp directory

Nov 22nd, 2013
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.77 KB | None | 0 0
  1. local attachment = {
  2.                 name = "Yeeha, Your image is now on your Facebook page!",
  3.                 link = "https://www.facebook.com/pages/3Claws-Games/419060951520798",
  4.                 caption = "Visit 3Claws on Facebook",
  5.                 description = "My scary Image on FearCam.",
  6.                 source = { baseDir, filename="imageForFb.jpg", type="photo" },
  7.                 source = { system.TemporaryDirectory, filename="imageForFb.jpg", type="image" },
  8.                 --picture = "http://www.coronalabs.com/links/demo/Corona90x90.png",
  9. --IT WORKS IF I COMMENT OUT THE source VARIABLE AND USE picture VARIABLE INSTEAD
  10. --BUT I HAVE TO PICK FROM THE TemporaryDirectory FOLDER
  11.                 actions = json.encode( { { name = "My Image", link = "http://3claws.org" } } )
  12.             }
  13.        
  14.             facebook.request( "me/feed", "POST", attachment )       -- posting the photo
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement