Facebook Plugin opens every time authorize screen in Ios Simulator

Every time I open my app in ios simulator it shows the message “This app has been already authorized” in a safari web view. It is quite annoying to have to make click on Ok every time to go back to the app

I use this code in one composer scene…all is working fine but that. It is the same code than facebook sample

local function enforceFacebookLogin( ) if facebook.isActive then local accessToken = facebook.getCurrentAccessToken() if accessToken == nil then print( "Need to log in" ) facebook.login( facebookListener ) elseif not inTable( accessToken.grantedPermissions, "public\_profile" ) then print( "Logged in, but need permissions" ) printTable( accessToken, "Access Token Data" ) facebook.login( facebookListener, {"public\_profile"} ) else print( "Already logged in with needed permissions" ) printTable( accessToken, "Access Token Data" ) statusMessage.text = "login" end else print( "Please wait for facebook to finish initializing before checking the current access token" ); end end

 My facebook app has SSO

For iOS 9, Apple is trying to force Facebook to use use a Safari View Controller for logins instead of the Facebook app. See: https://developers.facebook.com/blog/post/2015/10/29/Facebook-Login-iOS9/

The Xcode iOS simulator doesn’t have the Facebook app installed anyway so it has to use Safari to login. I’m checking with Engineering to make sure this is working as expected.

Rob

I can understand that, but why it opens safari again when the app has been already authorized?

Every call to facebook.login will call Safari. You can check your login token to see if it’s still good and just not call facebook.login again until either the token expires oro you need extra permissions.

Rob

If you look at the code I pasted in the first post, you can see it is what I am doing, but always show the authorize screen, saying it is already authorized…

I have the same problem!!! all time open window to autorize facebook…

my code is like this:

(I only have this problem build to iOs. In Android only open the autorize facebook window the first time…)

 accessTokenFacebook = facebook.getCurrentAccessToken();

 if ( accessTokenFacebook == nil ) then

         facebook.login(“public_profile”,“user_friends”); 

else

          facebook.request( “me” );

          facebook.request( “me/friends” );

end

Bug report case id: 46254

Rob, where we can see the status of a bug and in which version have been fixed?

You can’t see into our bug tracking system. This is more for my benefit so I can go check the status from time to time.

This is a plugin so it’s not tied to daily builds. When the plugin is updated, everyone will get the fix the next time they build their app. Unfortunately we don’t have a good way of announcing what changes happen in plugins and when.

Bugs have to be verified and assigned to an engineer and then has to get prioritized in with all the other things that engineer is working on.

But it all starts with a bug report…

Rob

Finally works ok when I publish it in apple app store!!! I think this confirmation only appear when you use a test friends creates in your Facebook aplication panel!!! :slight_smile: (posiblement when facebook aplication is not public…)

For iOS 9, Apple is trying to force Facebook to use use a Safari View Controller for logins instead of the Facebook app. See: https://developers.facebook.com/blog/post/2015/10/29/Facebook-Login-iOS9/

The Xcode iOS simulator doesn’t have the Facebook app installed anyway so it has to use Safari to login. I’m checking with Engineering to make sure this is working as expected.

Rob

I can understand that, but why it opens safari again when the app has been already authorized?

Every call to facebook.login will call Safari. You can check your login token to see if it’s still good and just not call facebook.login again until either the token expires oro you need extra permissions.

Rob

If you look at the code I pasted in the first post, you can see it is what I am doing, but always show the authorize screen, saying it is already authorized…

I have the same problem!!! all time open window to autorize facebook…

my code is like this:

(I only have this problem build to iOs. In Android only open the autorize facebook window the first time…)

 accessTokenFacebook = facebook.getCurrentAccessToken();

 if ( accessTokenFacebook == nil ) then

         facebook.login(“public_profile”,“user_friends”); 

else

          facebook.request( “me” );

          facebook.request( “me/friends” );

end

Bug report case id: 46254

Rob, where we can see the status of a bug and in which version have been fixed?

You can’t see into our bug tracking system. This is more for my benefit so I can go check the status from time to time.

This is a plugin so it’s not tied to daily builds. When the plugin is updated, everyone will get the fix the next time they build their app. Unfortunately we don’t have a good way of announcing what changes happen in plugins and when.

Bugs have to be verified and assigned to an engineer and then has to get prioritized in with all the other things that engineer is working on.

But it all starts with a bug report…

Rob

Finally works ok when I publish it in apple app store!!! I think this confirmation only appear when you use a test friends creates in your Facebook aplication panel!!! :slight_smile: (posiblement when facebook aplication is not public…)