I had my app working perfectly with ios8. I updated to the new CoronaSDK 2015.273, updated my XCode and recompiled my app for ios9. Suddenly I am able to login using facebook but facebook request is not working.
Oct 13 07:24:40 regiowars[89343]: event.name:fbconnect
Oct 13 07:24:40 regiowars[89343]: isError: true
Oct 13 07:24:40 regiowars[89343]: didComplete: nil
Oct 13 07:24:40 regiowars[89343]: event.type:request
If I check the facebook response I get : Oct 13 07:24:40 regiowars[89343]: The operation couldn’t be completed. (com.facebook.sdk error 5.)
Whereas in the login I can see :
Oct 13 07:24:18 Stark regiowars[89343]: event.name:fbconnect
Oct 13 07:24:18 Stark regiowars[89343]: isError: false
Oct 13 07:24:18 Stark regiowars[89343]: didComplete: nil
Oct 13 07:24:18 Stark regiowars[89343]: event.type:session
So login pretty much works. I also erased the app and installed it again so I could see the facebook page for login.
My code is pretty much the one in the corona example:
I have a login and a listener:
local function listener( event ) print( "event.name:" .. event.name ) --"fbconnect" print( "isError: " .. tostring( event.isError ) ) print( "didComplete: " .. tostring( event.didComplete ) ) print( "event.type:" .. event.type ) --"session", "request", or "dialog" --"session" events cover various login/logout events --"request" events handle calls to various Graph API calls --"dialog" events are standard popup boxes that can be displayed print(event.response) if ( "session" == event.type ) then --options are "login", "loginFailed", "loginCancelled", or "logout" if ( "login" == event.phase ) then access\_token = event.token facebookrequest() end --code for tasks following a successful login if ( event.phase == "ended" ) then end elseif ( "request" == event.type ) then if ( not event.isError ) then fbresponse = json.decode( event.response ) requestchecker(fbresponse) end end end facebook.login( FBAppID, listener, { "user\_friends" } )
I have a button for requesting facebook friends:
local function tochallenge( event) if ( "ended" == event.phase ) then local options = { isModal = true, } composer.showOverlay( "spinner",options ) facebook.request( "me/friends", "GET") end end
And pressing this one is when I get this error from facebook (after login).
I really dont know how to solve this one.