Facebook login double popup on iOS

I’m seeing strange behaviour upon first logging into facebook on my ios device, after the login process has completed (successfully or not) a second popup will appear asking me to enter my facebook credentials.

This popup is unnecessary as the login process has already completed and the app runs correctly if this dialog is closed. I do not encounter this issue is corona version 2014.2109 which is also before corona made facebook an optional plugin that can be added in the build settings of a project

I was wondering if anyone else has seen it?

I’m can see this behaviour when using corona version 2014.2393a (also on 2014.2189 and daily build 2014.2411), on an iPod 5 using iOS version 7.1.2.

What happens when you build the Facebook sample app?
 

Rob

Hi Rob,

I’ve looked a bit more into this issue today and find that this behaviour only appears when using “publish_actions” permission on the very first facebook login method call. I do not see the described issue when using “email”, “public_profile”, or “user_friends” permissions and subsequent login requests using “publish_actions” do not cause this behaviour.

You can observe the described behaviour in the facebook sample app by changing the first login method call at line 274 to read:

[lua]facebook.login( appId, listener,  {“publish_actions”}  )[/lua]

Facebook has changed the rules.  The “publish_stream” permission requires a second call to facebook.login().  You cannot request it on the initial login.  In fact Facebook wants that call to get “publish_stream” delayed until you actually need it.

So basically we cannot use the Sample app(facebook) of Corona now, because facebook changed its rule, so how are we gonna start a facebook login

Thanks Rob for the info, I don’t believe that having to make two calls to facebook.login will have any negative impact on our project so in our case this is fine.

@james8858 you should be fine to use the facebook login twice, right? An initial login with basic permissions, and a second permission for “publish_stream” when needed, or does this cause issues in your situation?

The Facebook sample code uses a 2 stage login process.  It requests the public features when the app starts up.  When you hit any of the buttons, it calls login a second time requesting the additional permission.

What build of Corona SDK are you using if your sample code isn’t doing this?

Rob

What happens when you build the Facebook sample app?
 

Rob

Hi Rob,

I’ve looked a bit more into this issue today and find that this behaviour only appears when using “publish_actions” permission on the very first facebook login method call. I do not see the described issue when using “email”, “public_profile”, or “user_friends” permissions and subsequent login requests using “publish_actions” do not cause this behaviour.

You can observe the described behaviour in the facebook sample app by changing the first login method call at line 274 to read:

[lua]facebook.login( appId, listener,  {“publish_actions”}  )[/lua]

Facebook has changed the rules.  The “publish_stream” permission requires a second call to facebook.login().  You cannot request it on the initial login.  In fact Facebook wants that call to get “publish_stream” delayed until you actually need it.

So basically we cannot use the Sample app(facebook) of Corona now, because facebook changed its rule, so how are we gonna start a facebook login

Thanks Rob for the info, I don’t believe that having to make two calls to facebook.login will have any negative impact on our project so in our case this is fine.

@james8858 you should be fine to use the facebook login twice, right? An initial login with basic permissions, and a second permission for “publish_stream” when needed, or does this cause issues in your situation?

The Facebook sample code uses a 2 stage login process.  It requests the public features when the app starts up.  When you hit any of the buttons, it calls login a second time requesting the additional permission.

What build of Corona SDK are you using if your sample code isn’t doing this?

Rob