Facebook change with G2.0?

Can somebody make clear what happened between public build 1202 and 2100 concerning Facebook API please?

I have an App for iOS, making new builds since August 2013. Last successfuld build was with 1202, but since then facebook login and sharing score doesn’t work with 2076 and 2100. I have made just small adjustments to test (color and position), nothing lese was changed. It doesn’t even seem to contact Facebook App, no error messages are thrown.

The same source code compiles still well with 1202, only that the text is in wrong position. Facebook works there as expected.

So I assume that something has been changed. What exactly?

Note: I am using Facebook Library, not Social Plugin

There have been several facebook.login() changes to prepare for the Feb 1. breaking changes.  But I don’t think you need to do anything different. Here are all the Facebook checkins since 1212.

Build 2126: iOS: When facebook.logout is called it will now clear the cached token.

Build 2099: iOS: Fixed an issue where calling facebook.login() would cause the listener to be called too many times.

Build 2082: iOS: Fixed an issue where the facebook listener wouldn’t receive an event when the user denies the login request.

Build 2082: iOS: Fix an issue where requesting additional Facebook permissions returned the incorrect event state

Build 1257: iOS: Fixed an issue where facebook.login would not respond

Build 1255: iOS: Updated the iOS implementation of Facebook so that it will request read and publish permissions seperately. There is not change required from the Lua side. This change will let iOS > 5 use the iOS native login dialog.

Rob

@Rob: Thanks!

I guess that the change to native login is the problem in this case. Just guess… I think I have something misconfigured…

This is my code:

[lua]    login = function()
          facebook.login(appId, listener, {“publish_actions”});
    end

    listener = function(event)

    print( “event.name”, event.name )  --“fbconnect”
    print( “event.type:”, event.type ) --type is either “session”, “request”, or “dialog”
    print( "isError: " … tostring( event.isError ) )
    print( "didComplete: " … tostring( event.didComplete ) )

    --“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

    if ( “session” == event.type ) then
        --options are: “login”, “loginFailed”, “loginCancelled”, or “logout”
        if ( “login” == event.phase ) then
            local access_token = event.token
            --code for tasks following a successful login
        end

    elseif ( “request” == event.type ) then
        print(“facebook request”)
        if ( not event.isError ) then
            local response = json.decode( event.response )
            --process response data here
        end

    elseif ( “dialog” == event.type ) then
        print( “dialog”, event.response )
        --handle dialog results here
    end
end[/lua]

and this is printed out in the console:

Jan 20 10:33:40 PhatCat SMTH[804] <Warning>: event.name    fbconnect
Jan 20 10:33:40 PhatCat SMTH[804] <Warning>: event.type:    session
Jan 20 10:33:40 PhatCat SMTH[804] <Warning>: isError: true
Jan 20 10:33:40 PhatCat SMTH[804] <Warning>: didComplete: nil
Jan 20 10:34:20 PhatCat locationd[44] <Notice>: client ‘com.facebook.Facebook’ stopping significant location changes
Jan 20 10:34:29 PhatCat backboardd[26] <Warning>: Facebook[392]: Could not stat /private/var/mobile/Applications/2801B668-C8AC-4353-88D1-1D09D9C51F15/tmp/etilqs_ARB7w7v0XYP4Obp: No such file or directory
Jan 20 10:34:29 PhatCat backboardd[26] <Warning>: Facebook[392]: Could not stat /private/var/mobile/Applications/2801B668-C8AC-4353-88D1-1D09D9C51F15/tmp/etilqs_HdzXxizXhVW6QV6: No such file or directory

iOS version: 6.1.3

Any idea, anyone?
 

You might want to print out event.phase and event.response and see if you get more information there.  Is there more in the log before this?

EDIT:  FYI, you’re login and listener functions are global.  It’s going to be real easy for you to stomp on this later if you have another listener function you call listener.

Rob

I’m having a similar issue with Facebook login whereby the user on iOS cannot connect unless they have an account in Settings on their phone. If they don’t (but still authorise the app) it goes nowhere from Facebook or displays “Error: This is not available at this time. Please try again later”.

In the logs it says that there are no Facebook accounts so the request is rejected. Any ideas?

Ok, I’ve found it: While in v.1202 iOS Facebook App is not required (I remember that I’ve found it strange, but accepted), login with native iOS dialog requires it. I added iOS platform on Facebook and it works now. Thanks for support, Rob!

Good to hear!

can you explain how you fix it ?

I am having the same problem,

thanks

Mine was solved by making sure the roles in the app’s settings on the Facebook Developer portal were correct. I’m not sure about OP’s 

The OP Didn’t have the Native IOS app setup in the Facebook developer’s portal.  They only had the Android app setup I guess.  If I read that post correctly.

Rob

There have been several facebook.login() changes to prepare for the Feb 1. breaking changes.  But I don’t think you need to do anything different. Here are all the Facebook checkins since 1212.

Build 2126: iOS: When facebook.logout is called it will now clear the cached token.

Build 2099: iOS: Fixed an issue where calling facebook.login() would cause the listener to be called too many times.

Build 2082: iOS: Fixed an issue where the facebook listener wouldn’t receive an event when the user denies the login request.

Build 2082: iOS: Fix an issue where requesting additional Facebook permissions returned the incorrect event state

Build 1257: iOS: Fixed an issue where facebook.login would not respond

Build 1255: iOS: Updated the iOS implementation of Facebook so that it will request read and publish permissions seperately. There is not change required from the Lua side. This change will let iOS > 5 use the iOS native login dialog.

Rob

@Rob: Thanks!

I guess that the change to native login is the problem in this case. Just guess… I think I have something misconfigured…

This is my code:

[lua]    login = function()
          facebook.login(appId, listener, {“publish_actions”});
    end

    listener = function(event)

    print( “event.name”, event.name )  --“fbconnect”
    print( “event.type:”, event.type ) --type is either “session”, “request”, or “dialog”
    print( "isError: " … tostring( event.isError ) )
    print( "didComplete: " … tostring( event.didComplete ) )

    --“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

    if ( “session” == event.type ) then
        --options are: “login”, “loginFailed”, “loginCancelled”, or “logout”
        if ( “login” == event.phase ) then
            local access_token = event.token
            --code for tasks following a successful login
        end

    elseif ( “request” == event.type ) then
        print(“facebook request”)
        if ( not event.isError ) then
            local response = json.decode( event.response )
            --process response data here
        end

    elseif ( “dialog” == event.type ) then
        print( “dialog”, event.response )
        --handle dialog results here
    end
end[/lua]

and this is printed out in the console:

Jan 20 10:33:40 PhatCat SMTH[804] <Warning>: event.name    fbconnect
Jan 20 10:33:40 PhatCat SMTH[804] <Warning>: event.type:    session
Jan 20 10:33:40 PhatCat SMTH[804] <Warning>: isError: true
Jan 20 10:33:40 PhatCat SMTH[804] <Warning>: didComplete: nil
Jan 20 10:34:20 PhatCat locationd[44] <Notice>: client ‘com.facebook.Facebook’ stopping significant location changes
Jan 20 10:34:29 PhatCat backboardd[26] <Warning>: Facebook[392]: Could not stat /private/var/mobile/Applications/2801B668-C8AC-4353-88D1-1D09D9C51F15/tmp/etilqs_ARB7w7v0XYP4Obp: No such file or directory
Jan 20 10:34:29 PhatCat backboardd[26] <Warning>: Facebook[392]: Could not stat /private/var/mobile/Applications/2801B668-C8AC-4353-88D1-1D09D9C51F15/tmp/etilqs_HdzXxizXhVW6QV6: No such file or directory

iOS version: 6.1.3

Any idea, anyone?
 

You might want to print out event.phase and event.response and see if you get more information there.  Is there more in the log before this?

EDIT:  FYI, you’re login and listener functions are global.  It’s going to be real easy for you to stomp on this later if you have another listener function you call listener.

Rob

I’m having a similar issue with Facebook login whereby the user on iOS cannot connect unless they have an account in Settings on their phone. If they don’t (but still authorise the app) it goes nowhere from Facebook or displays “Error: This is not available at this time. Please try again later”.

In the logs it says that there are no Facebook accounts so the request is rejected. Any ideas?

Ok, I’ve found it: While in v.1202 iOS Facebook App is not required (I remember that I’ve found it strange, but accepted), login with native iOS dialog requires it. I added iOS platform on Facebook and it works now. Thanks for support, Rob!

Good to hear!

can you explain how you fix it ?

I am having the same problem,

thanks

Mine was solved by making sure the roles in the app’s settings on the Facebook Developer portal were correct. I’m not sure about OP’s 

The OP Didn’t have the Native IOS app setup in the Facebook developer’s portal.  They only had the Android app setup I guess.  If I read that post correctly.

Rob