facebook.showDialog() appears and disappears after a while

Hello Corona Staff,

I’ve added Facebook to my application. 

The login is ok, except that facebook.login() opens the browser instead of the native Facebook App, but then, when I call Facebook.showDialog() the popup pops up, but after a second or two it disappears.

Note that I get this behavior on iOS only, while on Android it is working fine.

I’m using the code below in my game.lua file:

local function facebookListener( event ) if ( "session" == event.type ) then if ( "login" == event.phase ) then local access\_token = event.token facebook.showDialog( "feed", { name = "SuperCool Game Coming soon", description = "Trying to figure out how to get my game to rule the world.", picture = "http://omnigeekmedia.com/wp-content/uploads/2011/05/omniblaster\_promo-300x300.png", link = "http://www.omnigeekmedia.com/"}) end elseif ( "request" == event.type ) then print("facebook request") if ( not event.isError ) then local response = json.decode( event.response ) end elseif ( "dialog" == event.type ) then print( "dialog", event.response ) end end fbAppID = "my app ID" --replace with your Facebook App ID function logOnFacebook(event) if(event.phase=="ended")then facebook.login( fbAppID, facebookListener, { "user\_friends", "publish\_actions" } ) end end

and in build.settings i have:

["facebook"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone = true, ["iphone-sim"] = true }, },

I’m running on build 2015.2729.

How can I manage to get Facebook work? 

Thanks.

BR

Hello?

When I was using build 2015.2646 it was all working fine!

This is exactly my problem.

Does anyone know the most recent build that is good?

it’s tricky because the current build breaks this, but i need a build recent enough such that it works on xcode 7.1 / iOS sdk 9.1 which i need for latest fuse plugin. 

Apple made changes that requires you to update to the new Facebook V4 plugin if your building for iOS 9+. See:

https://docs.coronalabs.com/plugin/facebook-v4/index.html

https://coronalabs.com/blog/2015/07/24/facebook-v4-plugin-android-beta/ (Android)

https://coronalabs.com/blog/2015/09/01/facebook-v4-plugin-ios-beta-improvements-and-new-features/ (iOS)

Rob

Hello?

When I was using build 2015.2646 it was all working fine!

This is exactly my problem.

Does anyone know the most recent build that is good?

it’s tricky because the current build breaks this, but i need a build recent enough such that it works on xcode 7.1 / iOS sdk 9.1 which i need for latest fuse plugin. 

Apple made changes that requires you to update to the new Facebook V4 plugin if your building for iOS 9+. See:

https://docs.coronalabs.com/plugin/facebook-v4/index.html

https://coronalabs.com/blog/2015/07/24/facebook-v4-plugin-android-beta/ (Android)

https://coronalabs.com/blog/2015/09/01/facebook-v4-plugin-ios-beta-improvements-and-new-features/ (iOS)

Rob