Hi there, I need help to solve this problem: I want to post on FB a save screen from my app (I got save screen by using display.save function). Everything works fine on Android while on my iPad it makes app crash!
I tested on two iPAD, one with native FB app installed and one with no FB app installed. It crashes in both devices.
Please find the function code below:
local function postonFB( event)
display.save( tab3fields, { filename=“ticket.jpg”, baseDir=system.DocumentsDirectory, isFullResolution=true, backgroundColor={0, 0, 0, 0} } )
local fbAppID = “4531113981XXXXX”
local function fbListener( event )
if event.phase == “login” then
local attachment = {
message=“I am a champion!”,
source= {baseDir=system.DocumentsDirectory, filename=“ticket.jpg”, type=“image”}
}
facebook.request(“me/photos”, “POST”, attachment)
native.showAlert(“Facebook”, “Submitted!”)
end
end
– photo uploading requires the “publish_actions” permission
facebook.login( fbAppID, fbListener, { “publish_actions” } )
end
I connected my iPAD to Xcode and i got this log errors: Jun 17 08:28:15 iPad-di-Ubaldo lineitup[1795] <Error>: *** Terminating app due to uncaught exception ‘com.facebook.sdk:InvalidOperationException’, reason: ‘FBSession: No AppID provided; either pass an AppID to init, or add a string valued key with the appropriate id named FacebookAppID to the bundle *.plist’ I think I pass all the info requested but for some reasons FB does not get them…:( –