I know they are working on it.
Rob
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.
Hello there.
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.
Thanks
The new Facebook v4 plugin binaries have been pushed up. It can take ~1hour to go live.
So if you wouldn’t mind seeing if your issue is resolved after rebuilding in an hours time (an hour after this post), I’d appreciate it.
Thank you
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.
I’ll give that a try, though I’m pretty sure I’ve already tried calling logout() and then login() again, as it was suggested by someone before (possibly on another forum post).
Hi guys,
For the iOS 9 and facebook v4 plugin, i have faced a new issue.
I have created a new facebook app and try to login with the new app. Everything works fine.
But with the old one, it never login, the resonse is:
response_raw The operation couldn’t be completed. (com.facebook.sdk.login error 304.)
I have tried to reset the client token for the old facebook app however still cannot log in.
Same code, same plugin, same corona version with different facebook application id
Hi Rob, is there any more news on this login issue yet?
Using the sample app I no longer see this issue either on iOS or Android (login cancelled). And we’ve determined the cause (at least on Android, I’m still scratching my head why it went away on iOS)…
Any way, a few weeks ago, I update my app on Facebook’s developer portal to change my Client Token (under Settings->Advanced) and then iOS started working. But that didn’t do anything for Android. Using the sample app any thing after the first login attempt would result in a Login Cancelled.
My app was live on Facebook, but I never submitted it for review. The sample app was requesting the “publish_actions” permission which has to be approved by Facebook for live apps. Once I unpublished my app and put it back in testing mode, and using a test account, I can use the sample app with perfection with the exception of one of the dialogs which we know about and are working on.
The the gist of this is there are permissions like “publish_actions” which have to be approved by Facebook before you can use them in a “live” app. And in a non-live app, only listed testing accounts (and your admin account) can use the app.
The sample app always asks for “publish_actions” on subsequent logins but not the first login, which is why I was always getting a successful first run. If you’re asking for “publish_actions” in your first login, it’s going to fail if you’re not been approved by FB to use this on a live app.
Rob
@Rob; My facebook app has no client token set, and I am publishing this app for about 4 years without any problems.
What does client token do exactly?
I don’t know what it does. It doesn’t seem to impact the legacy Facebook plugin. The LoginCancelled feature seems to be something Facebook is doing in V4. I don’t know if it was the token or not, but before I set it, I was getting LoginCancelled on iOS after I set it, it seemed to work.
However I suspect its still has to do with my app being published/marked live without getting approval for “publish_actions” that was the real culprit.
Rob
Just wanted to add I’m having the same ‘loginCancelled’ issue on iOS. I have reset the client token, but no luck. I used to use the publish_actions permission which was approved previously, but I noticed today it was no longer approved. Since I don’t use it anymore I just removed the request by hitting ‘Start Over’ in Facebook’s settings.
Please let me know if there are any other suggestions. Running Corona SDK 2906.
UPDATE:
I can confirm the same code works 100% on android for logging into Facebook. This seems to be an iOS isolated issue.
I’m really struggling with the v4 plugins (iOS and Android) and I’ve no idea why since I’ve integrated lots of libraries before.
I’d already posted about my similar iOS issue here: https://forums.coronalabs.com/topic/61308-having-problems-getting-the-facebook-v4-ios-plugin-to-login-possibly-due-to-ats/
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
Again I’ve posted this before but with no luck:
https://forums.coronalabs.com/topic/63324-android-studio-integration/
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.
We are aware of the login problem and hopefully we can get a resolution soon.
Rob
Phew, so it’s not just me doing something stupid then? That is somewhat of a relief tbh.
Hi Alan QuizTix,
In regards to the Android issue you encountered, I did find this little gem in the changelog for Facebook SDK 4.13.0:
Fixed
We’re still investigating other login-related issues on both platforms, but I thought I’d share that piece of news with you.