Using the latest daily build, I’m trying to implement the example Facebook code below:
[code]
local function facebooklistener(event)
if ( “session” == event.type ) then
– upon successful login, request list of friends of the signed in user
if ( “login” == event.phase ) then
facebook.request( “me/friends” )
– Fetch access token for use in Facebook’s API
local access_token = event.token
print( access_token )
end
elseif ( “request” == 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
local function buttonpressed(event)
facebook.login("",facebooklistener,{“publish_stream”})
return true
end
[/code]
The error I get is the mysterious (at least to me) FBConditionalLog: handleOpenURL should not be called once a session has been closed.
Any ideas what’s up?
Thanks in advance,
Jon [import]uid: 127193 topic_id: 36410 reply_id: 336410[/import]