I’m trying to publish a score using the graph API, which is a built in action
Here’s my code:
local facebookListener = function( event )
if ( "session" == event.type ) then
if ( "login" == event.phase ) then
-- THIS WORKS FINE
facebook.request( "me/feed", "POST"....)
-- THIS DOESN'T WORK
facebook.request("me/scores" , "POST", {score=100,access\_token=event.token})
-- THIS DOESN'T WORK AS WELL
local postData = "score=".. 100 .. "&access\_token=" .. event.token
local params = {}
params.body = postData
network.request( "https://graph.facebook.com/me/scores",
"POST", facebookListener2,params )
-- AND facebookListener2 NEVER GETS CALLED
end
end
facebook.login( appId, facebookListener, {"publish\_actions"} )
I’m trying to implement what’s on page 25 in this (official facebook) presentation:
https://www.sugarsync.com/pf/D7793105_2123952_8514553
Anyone ever implemented something like this?
[import]uid: 150930 topic_id: 32461 reply_id: 332461[/import]