I want to receive the Facebook friends list. I copied from some blog the follow code:
local facebook = require “facebook”
local json = require “json”
local function listener( event )
if ( “session” == event.type ) then
if ( “login” == event.phase ) then
facebook.request( “me/friends” )
end
elseif ( “request” == event.type ) then
local response = event.response
if ( not event.isError ) then
response = json.decode( event.response )
text1.text = “response:”…response
end
end
end
local appId = “1306XXXXXXX”
facebook.login( appId, listener)
text1 = display.newText (“Here will be response”, 30 , 100 , nil , 15 )
But after I log-in into Facebook from application, the text1.text remains “Here will be response”
What does I miss here?
[import]uid: 144261 topic_id: 28731 reply_id: 328731[/import]