Button for facebook page

I would like to put on my Facebook page a button that will open the app if installed.

Otherwise I should bring the user to one of the two stores(app store, google play) for download.

Do you know how to do or guide me? I did not find myself very much.

Thank you all!

I forget who posted this a couple of weeks ago, but they worked out all the dynamics:

local function facebookLike() local fbPageID = "1234567890123456" -- your Facebook page id : STRING MANDATORY local fbPageURL = "https://m.facebook.com/"..fbPageID local platform = system.getInfo( "platform" ) if platform == "android" then -- android local fbPageURL\_androidApp = "fb://page/"..fbPageID if ( system.canOpenURL(fbPageURL\_androidApp) ) then system.openURL(fbPageURL\_androidApp) -- open in native app else system.openURL(fbPageURL) -- open in browser end elseif platform == "ios" then -- ios local fbPageURL\_iosApp = "fb://profile/"..fbPageID if ( system.canOpenURL(fbPageURL\_iosApp) ) then system.openURL(fbPageURL\_iosApp) -- open in native app else system.openURL(fbPageURL) -- open in browser end else system.openURL(fbPageURL) -- open in browser end end

I’ve done limited testing of this but it seems sound. Note it does not need the Facebook plugin to work.

Rob

I apologize. Maybe I did not explain. My app page is on Facebook. On Facebook I would like to add a button. This button must open the app or bring it to the store to download it. I know it does not directly affect corona labs, but I wonder if someone has done this right here. I think I have to use facebook developer but I do not know how to move.

I forget who posted this a couple of weeks ago, but they worked out all the dynamics:

local function facebookLike() local fbPageID = "1234567890123456" -- your Facebook page id : STRING MANDATORY local fbPageURL = "https://m.facebook.com/"..fbPageID local platform = system.getInfo( "platform" ) if platform == "android" then -- android local fbPageURL\_androidApp = "fb://page/"..fbPageID if ( system.canOpenURL(fbPageURL\_androidApp) ) then system.openURL(fbPageURL\_androidApp) -- open in native app else system.openURL(fbPageURL) -- open in browser end elseif platform == "ios" then -- ios local fbPageURL\_iosApp = "fb://profile/"..fbPageID if ( system.canOpenURL(fbPageURL\_iosApp) ) then system.openURL(fbPageURL\_iosApp) -- open in native app else system.openURL(fbPageURL) -- open in browser end else system.openURL(fbPageURL) -- open in browser end end

I’ve done limited testing of this but it seems sound. Note it does not need the Facebook plugin to work.

Rob

I apologize. Maybe I did not explain. My app page is on Facebook. On Facebook I would like to add a button. This button must open the app or bring it to the store to download it. I know it does not directly affect corona labs, but I wonder if someone has done this right here. I think I have to use facebook developer but I do not know how to move.