Hi
I’m trying to enable the player to publish a message on his Facebook wall. I have correctly set up build.settings file and generated key hash number.
my code is:
------------------ --FACEBOOK ------------------ local function listener( event ) if ( "session" == event.type ) then if ( "login" == event.phase ) then --facebook.request( "me/friends" ) facebook.showDialog( "apprequests", { message = "This is a test!" }) -- Fetch access token for use in Facebook's API local access\_token = event.token print( access\_token ) end elseif ( "dialog" == event.type ) then -- event.response is a JSON object from the FB server local response = event.response -- if request succeeds, create a scrolling list of friend names if ( not event.isError ) then response = json.decode( event.response ) local data = response.data for i=1,#data do local name = data[i].name print( name ) end end elseif ( "dialog" == event.type ) then print( "dialog", event.response ) end end -- NOTE: You must provide a valid application id provided from Facebook local appId = "xxxxxxxxxxxx" if ( appId ) then facebook.login( appId, listener, {"publish\_stream"} ) else local function onComplete( event ) system.openURL( "http://developers.facebook.com/setup" ) end native.showAlert( "Error", "To develop for Facebook Connect, you need to get an application id from Facebook's website.", { "Learn More" }, onComplete ) end
but as I try it on my pohne I get:
API Error Code: 110
API Error Description: Invalid user id
Error Message: Missing user cookie (to validate session user)
Has anyone expirienced the same issue?
Thanks
Tomaz