Facebook login on iOS always cancels the very first login attempt

Same issue here,

Login facebook with iOS9, facebook_v4 plugin always return “loginCancelled”. 

This bug occur when login game with new facebook account which have not logged in before.

With the facebook account which login successfully with old facebook plugin, everything is normal with the v4 plugin.

For android, no error occurs.

Enterprise 2886.

***Update:

Getting everything work well with iOS9 by using the old facebook plugin

Waiting for the bug fixed from facebook v4 plugin!!!

Thanks for the update Ajay, this was driving me crazy. Is there a rough ETA on when we can expect fixes?

It would seem my loginCancelled issue is slightly different to yours yogamegroup, as I cannot login with any Facebook account regardless of whether it had previously logged in with the old plugin.

We’re currently working to get a new public release out, so it will be sometime after that.

Update:

Today we had an alert from Facebook for each of our apps:

Graph API v2.1 Upgrade Notice

 

QuizTix has been making recent API calls to Graph API v2.0, which will reach the end of the 2-year deprecation window on Monday, August 8, 2016. Please migrate all calls to v2.1 or higher in order to avoid potential broken experiences.

We recommend using our new Graph API Upgrade Tool to see which of your calls are affected by this change as well as any replacement calls in newer versions. You can also use our changelog to see the full list of changes.

When I go to the upgrade tool and select one of my apps I get this message: 

Your app hasn’t made enough calls to the Graph API to show any info, or there are no changes for the methods you selected between v2.0 and v2.6

Now I’m surprised if there aren’t enough calls to provide any data, so I’m wondering if the existing plugin is not calling any methods that are being deprecated in August. At any rate, I thought the deadline for upgrading the plugin was in October and not August.

Where does this leave us currently?

Hi Alan;

We received similar notices from Facebook today as well on two of our apps (about making calls to the deprecated Graph API v2.0).

Both of our apps are up-t-date using the plugin facebook.v4. It is about 45 days until Facebook’s cutoff.

So I am wondering about this too.

Steve

For those getting this message, the legacy Facebook plugin should be compile against a version that uses 2.1 end points. If your app is older, it may be compiled against a non-compliant SDK version. Simply rebuilding against the legacy plugin should address this, or you may need to make sure your API calls are explicitly calling newer end points.

Any old app will likely need updated.

As far as if you’re getting these messages against your apps using v4, could it be possible you have users who have not updated their apps?

Rob, do you happen to know of any way to check which end points are in use?  

If I download the latest Corona Enterprise plugins folder, and go into the Facebook folder (not Facebook-v4) will the facebook.jar and facebook_sdk.jar files in there be using 2.1 end points? I’ve had a quick look through the jars themselves but couldn’t see any mention of which end points were in use.  

The files say they were last updated on 10/12/2014, which seems like a long time ago, so hard to know if they’ll be sufficient or not.

Ajay told me yesterday that the current non-V4 plugin should be using 2.1 endpoints.

The Facebook SDK changelog for version 3.17 is where they started targeting Graph API v2.1:

iOS changelog: https://developers.facebook.com/docs/ios/change-log-3.x

Android changelog: https://developers.facebook.com/docs/android/change-log-3.x

The old Facebook plugin currently uses Facebook SDK 3.19 on iOS and 3.18 on Android.

Hi there,

Any news for the bugs with plugin facebook v4 with iOS9.

Thanks so much!!! 

I don’t have any more news other than we are trying to find the problem.

Rob

So as to not continue hijacking this thread from login problems, can we continue the discussion about the Graph API 2.0 email warnings on this thread:

https://forums.coronalabs.com/topic/63786-graph-api-v21-upgrade-notice/

Thanks

Rob

Now that the latest public build has been released, I just wondered if there is a rough ETA regarding the v4 login issues?

I know they are working on it.

Rob

Ok that’s great. I knew it was on the radar, but wasn’t sure how long after the public build it would be before it was being worked on. Thanks for the update.

Hi there,

Any news for the bugs with plugin facebook v4 with iOS9.

Thanks so much!!! 

For iOS make sure you have set the Client Token in the FB Developer control panel:  https://developers.facebook.com Go to your app’s settings open the advanced tab and reset the client token.

That seemed to be a fix for my test app. But on Android we are still exploring the cause.

Rob

In fact, i have no issues with facebook_v4 on Android. 

What are those issues ??

It appears to be some setup issue that’s causing the problem, we just don’t know what it is yet so not every developer will experience it. For instance the engineer working on it, when he uses his Facebook app, works like a charm, when he hits my Facebook app, it fails.

The investigation continues. 

Hi guys,

I may have found a fix for this problem. First of all: the problem only affects some facebook accounts. One of my test accounts is working fine while the other one fails every time.

I am using latest public release 2907 and official facebook example.

First login attempt works fine for me, but the second one, the one you trigger by clicking “Get User” button, always fails with loginCancelled event.

I simply patch enforceLogin() function as follows:

local function enforceFacebookLogin( ) if facebook.isActive then local accessToken = facebook.getCurrentAccessToken() if accessToken == nil then print( "Need to log in" ) facebook.logout() -- PATCHED CODE facebook.login( listener ) elseif not inTable( accessToken.grantedPermissions, "publish\_actions" ) then print( "Logged in, but need permissions" ) printTable( accessToken, "Access Token Data" ) facebook.logout() -- PATCHED CODE facebook.login( listener, {"publish\_actions"} ) else print( "Already logged in with needed permissions" ) printTable( accessToken, "Access Token Data" ) statusMessage.textObject.text = "login" processFBCommand() end else print( "Please wait for facebook to finish initializing before checking the current access token" ); end end

I inserted facebook.logout() statement just before facebook.login(…)

This change prevent loginCancelled event, and everything seems working fine. Please test and share your results.