Was just about to submit an update to apple when I thought that I would just test the social buttons I have on my app, good job I did as neither of the Facebook buttons I have work at all.
the 1st button is a basic one that takes the user to my Facebook page
local onFaceTouch = function( event ) if event.phase == "release" then audio.play( clickSound ) system.openURL( "https://www.facebook.com/mypage" ) end end
the issue with this one is that when I have the Facebook app installed it just takes me to my timeline rather than than my business page. when I uninstall the Facebook app it opens up Safari and goes to the current page. I’m assuming Facebook have changed something in their app that is stopping linking like this from working, is there a solution to this??
the 2nd button (the one thats more important to get working) is so the users can post their scores from my app to their timeline.
I have the following in my build.settings
iphone = { plist = { UIApplicationExitsOnSuspend = false, FacebookAppID = "XXXXXXXXXXXXXXX", CFBundleURLTypes = { { CFBundleURLSchemes = {"fbXXXXXXXXXXXXXXX",} } } } }
and then the following in my main.lua file
local onFaceTouch = function( event ) if event.phase == "release" then audio.play( clickSound ) -- listener for "fbconnect" events local function listener( event ) if ( "session" == event.type ) then -- upon successful login, request list of friends if ( "login" == event.phase ) then facebook.showDialog( "feed", { message="my message", name="some info", caption="my caption", link="line to the iTunes store", picture="link to picture" }) end elseif ( "dialog" == event.type ) then print( event.response ) end end -- first argument is the app id that you get from Facebook facebook.login( "XXXXXXXXXXXXXXX", listener ) end end
when you click the button, it asks for me to login in and then gives me an error message of “An error occurred. Please try again later.”
You then click the ‘okay’ button and it then says “Invalid App ID. The provided app ID is invalid”
I was using version 2013.1202 (2013.8.28) originally and everything worked fine, but with having to move to 2014.1262 (2014.1.28) its now stopped and I can’t get it started again
any help would be great, I was literally 2 minutes away from submitting my update before this all screwed up!!!