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