You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Android - facebook login dialog misbehaves and results in an error response if the dialog is launched in a different screen orientation than the app's screen orientation.
#63
Open
msesen opened this issue
Jul 29, 2024
· 0 comments
Upon clicking on the “Facebok login” button, the login dialog is launched in portrait mode.
If already logged in, Facebook informs you that you have previously logged into this app. Clicking on the Continue button closes the dialog and immidiately launches the dialog again. Clicking on the Continue button for the second time closes the dialog with an error {status = 0, error = “Aborted”}.
If I disable the screen rotration lock, then it works (if the device is held in landscape mode, otherwise the dialog will launch in portrait mode). The login dialog is launched in landscape mode, clicking on the Continue button returns to the app with the success payload of status = 200. HTML 5 build also works. But unfortunately, I need the game in landscape mode.
Could it be that the Activity that launches the dialog gets destroyed upon screen rotation?
Defold Editor 1.9.0, and the extension version is 9.0.0.
Here is a sample code.
`local function facebookLogin(self, data)
if data.status == facebook.STATE_OPEN then
-- Logged in ok.
elseif data.status == facebook.STATE_CLOSED_LOGIN_FAILED then
-- Do something to indicate that login failed
end
if data.error then
-- .. something went wrong
end
end
local function onFacebookLoginBtnClick(self)
if not facebook then
-- Facebook login is not available for this device.
return
end
-- Login with read permissions.
local permissions = { "public_profile" }
facebook.login_with_permissions(permissions, facebook.AUDIENCE_EVERYONE, facebookLogin)
end`
The text was updated successfully, but these errors were encountered:
If I disable the screen rotration lock, then it works (if the device is held in landscape mode, otherwise the dialog will launch in portrait mode). The login dialog is launched in landscape mode, clicking on the Continue button returns to the app with the success payload of status = 200. HTML 5 build also works. But unfortunately, I need the game in landscape mode.
Could it be that the Activity that launches the dialog gets destroyed upon screen rotation?
Defold Editor 1.9.0, and the extension version is 9.0.0.
Here is a sample code.
`local function facebookLogin(self, data)
end
local function onFacebookLoginBtnClick(self)
if not facebook then
-- Facebook login is not available for this device.
return
end
end`
The text was updated successfully, but these errors were encountered: