I made a simple app with Facebook integration that posts a simple message on my facebook account. But when i run it on my phone and click on the share button ,a dialog pops up which says: myApp would like to acess your public profile and firend list. But when I click OK nothing happens,nothing is posted on my wall. What could be the problem?
local facebook = require ("facebook") local widget = require ("widget") local appId = "718373771552331" local function listener1( event ) if ( "session" == event.type ) then -- upon successful login, request list of friends if ( "login" == event.phase ) then -- facebook.showDialog( "feed", { message="You should download this game!" } ) facebook.request( "me/feed", "POST", { message="Hello Facebook" } ) end elseif ( "dialog" == event.type ) then print( event.response ) end end local function handleShare( event ) if(event.phase == "ended") then print("da") facebook.login( appId, listener1 ) end end local kopce2 = widget.newButton { width = 100, height = 100, id="kopce2", label = "share", onEvent= handleShare } kopce2.x = display.contentCenterX kopce2.y = display.contentCenterY-200
I use this code sample. I was wondering if i should make a test user on facebook, so that i could test it .