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