I’m having a weird issue with the new Facebook v4 implementation in my Corona project. The issue is that whenever I try to login with Facebook on an iOS device after the first install it will always cancel the first login attempt. (app is iOS only so haven’t tested this on Android).
the weird thing is all the following logins work perfectly fine. And the problem only occurs when the app is installed for the first time on a new device… So deleting the app and reinstalling it does not trigger the cancel issue.
Only times I can reproduce this issue is in either one of these cases:
install the app on a new device (the app cannot be installed previously)
change the app id (com.company.appname1, com.company.appname2 etc)
Also I think this issue only exists on iOS9, but I’m not 100% sure about this. I just wasn’t able to reproduce this issue on any iOS version below 9.
Did someone else notice this issue? And if so, is there a fix or workaround for this?
I haven’t experienced this issue personally whilst testing. However, there will be a new Facebook plugin binary submitted today that will hopefully resolve some of these strange quirks.
We updated our system to build Facebook from source, so we can stay more up to date with their changes.
I’ll reply again when the plugin is submitted to our build server.
On iOS I always get the “loginCancelled” phase when I try and log in with the v4 plugin (it works fine using the old plugin).
I’ve seen another post where someone said they called facebook.logout when this phase was triggered but that doesn’t work for me. In my plist file I have Allow Arbitrary Loads set to true. It actually seems like the request goes through, because as mentioned in my other post I added a launch url listener which appears to contain successful login info. I’m using a recent version of Enterprise (2886) and the Facebook library from the 2886 plugins folder.
As far as I can tell I’ve done everything that the docs describe, including the migration guide and yet it still says cancelled every single time.
Another dev suggested removing the NSExceptionDomains from my plist, but that didn’t have any effect at all.
On Android everything builds and runs ok until I try to login, at which point I get an error telling me:
Class not found when unmarshalling: com.facebook.login.LoginClient$Request
I’m taking a look at this today in case I’ve accidentally included an incorrect resource or something, but it’s concerning that I’m having so many problems with this plugin. Seemingly it works fine for everyone else so I’m not sure what I’m doing wrong.
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.
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.
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.