Am about to rip all my hair out (well what little I have left that is), have been trying for about the last 4 hours to just post a simple message to Facebook.
but whatever I do just doesn’t seem to work
the current code I’m working with is (using build 2013.1137)
local onFaceTouch = function( event ) if event.phase == "release" then audio.play( clickSound ) local fbAppID = "XXXXXXXXXXXXXXX" local facebookListener = function( event ) if ( "session" == event.type ) then if ( "login" == event.phase ) then local scoreToPost = 99 local statusUpdate = "I've just scored " .. scoreToPost .. "!" facebook.request( "me/feed", "POST", { message = statusUpdate } ) end end end facebook.login( fbAppID, facebookListener, { "publish\_stream" } ) end end
with the following in the build.settings
settings = { orientation = { default = "portrait", supported = { "portrait", }, }, iphone = { plist = { UIApplicationExitsOnSuspend = false, CFBundleDisplayName = "My App", FacebookAppID = "XXXXXXXXXXXXXXX", CFBundleURLTypes = { { CFBundleURLSchemes = {"fbXXXXXXXXXXXXXXX",} } } } } }
when the button that is assigned to the main script is clicked it takes me to Facebook where it asks me
“My App would like to access your public profile an friend list”
click ok
then
“My App” would like to post to your friends on your behalf
click ok
then it takes me back to my app without posting anything to Facebook.
Click on the button with the code on a second time, it goes to facebook with the following error message “invalid sso_key parameter. the key “app” does not match any allowed bundle IDs”
for 4 hours I’ve been going round and round and just can’t get the f***ing thing to work!
does anyone have any ideas what is wrong, or a better way of doing it??
my sanity is on the line here!