Daily Build 1141 broke the Facebook login flow for Android. The changelog for that build lists “Android: Update the Facebook SDK to version 3.0.1”, so that’s the culprit.
Specifically, prior to build 1141 (e.g., build 1139), facebook.login() would present the standard Facebook interface to request user permissions. Starting in build 1141, it presents an ugly native alert to request user permissions. The alert doesn’t allow the user to change the privacy settings of the permissions, looks untrustworthy, and may be indicative of more serious issues with how the login flow is being handled.
EDIT: Per additional note further down this thread, it’s possible that this change in behavior isn’t actually a bug, but it would still be interesting to understand why it changed.
The bug was first mentioned in a previous thread (http://forums.coronalabs.com/topic/36635-android-facebook-after-build-coronasdk-20131076/), but the conversation on that thread changed topic, and the original core issue hasn’t been addressed.
Here’s information about my device setup and an extremely simple test case that demonstrates the issue:
-
DroidX running Android 2.2. (I haven’t tested on higher Android OS versions; it may or may not affect them too)
-
Device must have the latest Facebook app installed on the device (I updated it from Google Play today)
-
You must not have your app already authorized on Facebook, because if you do, you won’t see the login/permission interface. (To deauthorize an app on Facebook, go to Account Settings, select Apps from the left column, and then click the ‘x’ next to the app name.)
main.lua
[lua]
local facebook = require(“facebook”)
local widget = require(“widget”)
local appId = “YOUR APP ID HERE”
local listener = function(event)
for k,v in pairs(event) do
print(k,v)
end
end
local login = function()
facebook.login(appId, listener, {“user_likes”})
end
local loginButton = widget.newButton(
{
label = “Login”,
onRelease = login
}
)
loginButton.x, loginButton.y = 100,100
[/lua]
build.settings
[lua]
settings =
{
android =
{
usesPermissions =
{
“android.permission.INTERNET”,
“android.permission.ACCESS_WIFI_STATE”,
“android.permission.ACCESS_NETWORK_STATE”,
“android.permission.READ_PHONE_STATE”,
},
}
}
[/lua]
I’ll also file a bug report for this, but I wanted to post it here in the hopes that it’ll get more immediate attention.
Thanks.
- Andrew