Hello
I am using facebook post in my App for Android.
Following is my code.
onLoginSuccess = function()
local attachment = {
message = "I am playing this amazing game - you should try it! ",
source = {
baseDir=system.ResourceDirectory,
filename=“abc.jpg”,
type=“image”
}
}
facebook.request( “me/photos”, “POST”,attachment )
end
facebookListener = function(event)
if event.isError then
native.showAlert( “ERROR”, event.response, { “OK” } )
else
if event.type == “session” and event.phase == “login” then
– login was a success; call function
onLoginSuccess()
elseif event.type == “request” then
– this block is executed upon successful facebook.request() call
print(“Photo Uploaded Successfully”)
native.showAlert( “success”, “The post sent successfully.”, { “OK” } )
facebook.logout()
end
end
end
local fbAppID = “XXXXXXXXXXXXX”
facebook.login( fbAppID, facebookListener, { “publish_actions” } )
But i get the (#200) permissions error
Please help me. i stuck here.
Thanks