POST score to Facebook

I’m having the same issue. If the score is passed as a string instead of an integer (as it’s supposed to be according to the Facebook docs) I was able to get the right response from Facebook (true) but the score doesn’t show up on the user’s wall or ticker. Could it be that Corona’s Facebook API doesn’t work with integers? I even tried passing event.token but not sure if that’s the app’s access token or the user’s access token.

Would be great if anyone at Ansca could take a look at this issue as posting scores to Facebook could be very useful to a lot of game developers. [import]uid: 10048 topic_id: 15825 reply_id: 126879[/import]

bumping… can anyone from the staff help here?
I got a “true” response after posting but nothing showed up on my timeline/activity [import]uid: 150930 topic_id: 15825 reply_id: 129165[/import]

I think that might be a facebook/setup issue. I did a quick test using the Graph API Explorer and posted a score for my test app and it responded true, but I don’t see it in my activities on my timeline. But if I do a GET on me/scores it returns the score I set. So it’s working.

I think part of the problem is that I don’t have all the things setup for my app yet. It’s a test app, so I don’t have icons, screen shots, etc. It’s probably not posting because it doesn’t have all the things it needs to post to the time line.

[import]uid: 19626 topic_id: 15825 reply_id: 129171[/import]

bumping… can anyone from the staff help here?
I got a “true” response after posting but nothing showed up on my timeline/activity [import]uid: 150930 topic_id: 15825 reply_id: 129165[/import]

I think that might be a facebook/setup issue. I did a quick test using the Graph API Explorer and posted a score for my test app and it responded true, but I don’t see it in my activities on my timeline. But if I do a GET on me/scores it returns the score I set. So it’s working.

I think part of the problem is that I don’t have all the things setup for my app yet. It’s a test app, so I don’t have icons, screen shots, etc. It’s probably not posting because it doesn’t have all the things it needs to post to the time line.

[import]uid: 19626 topic_id: 15825 reply_id: 129171[/import]

Ok, people, I got this to work!
http://www.freeimagehosting.net/zkhyo

I asked someone in facebook why am I getting “true” and still see nothing, and this was his reply:

"The Scores API is unique in that a successful POST does not directly map to a specific story – we apply some logic – for example – is this score higher than the previous one we had stored for you – if so, generate a “high score” story. We also check to see if the score has passed any of your friends previous scores, and if so, generate the “passing” story. In addition, we will not generate more than one story per hour – infact in some circumstances we will just update the previously generated story.

DELETE the scores for your app or some specific users, and then POST two incrementally higher scores, and then you should see a high score story. But there are some heuristics that mean it’s a non-deterministic operation.

If you are receiving a “true” response from the API, you can be confident that you are doing everything correctly." [import]uid: 150930 topic_id: 15825 reply_id: 129471[/import]

could you provide a code sample to show how you got that to work? [import]uid: 70708 topic_id: 15825 reply_id: 129476[/import]

Ok, people, I got this to work!
http://www.freeimagehosting.net/zkhyo

I asked someone in facebook why am I getting “true” and still see nothing, and this was his reply:

"The Scores API is unique in that a successful POST does not directly map to a specific story – we apply some logic – for example – is this score higher than the previous one we had stored for you – if so, generate a “high score” story. We also check to see if the score has passed any of your friends previous scores, and if so, generate the “passing” story. In addition, we will not generate more than one story per hour – infact in some circumstances we will just update the previously generated story.

DELETE the scores for your app or some specific users, and then POST two incrementally higher scores, and then you should see a high score story. But there are some heuristics that mean it’s a non-deterministic operation.

If you are receiving a “true” response from the API, you can be confident that you are doing everything correctly." [import]uid: 150930 topic_id: 15825 reply_id: 129471[/import]

could you provide a code sample to show how you got that to work? [import]uid: 70708 topic_id: 15825 reply_id: 129476[/import]

facebook.login( appId, facebookListener, {"publish\_actions"} )  

note the “publish_actions” permission

and this is facebookListener:

local facebookListener = function( event ) if event.isError then native.showAlert("Facebook", event.response, { "Ok" }) elseif event.type == session then if event.phase == "login" then local params = { score=tostring(playerScore), access\_token=event.token } facebook.request("me/scores" , "POST", params) end elseif event.type == "request" then -- this block is executed upon successful facebook.request() call end end [import]uid: 150930 topic_id: 15825 reply_id: 129633[/import]

facebook.login( appId, facebookListener, {"publish\_actions"} )  

note the “publish_actions” permission

and this is facebookListener:

local facebookListener = function( event ) if event.isError then native.showAlert("Facebook", event.response, { "Ok" }) elseif event.type == session then if event.phase == "login" then local params = { score=tostring(playerScore), access\_token=event.token } facebook.request("me/scores" , "POST", params) end elseif event.type == "request" then -- this block is executed upon successful facebook.request() call end end [import]uid: 150930 topic_id: 15825 reply_id: 129633[/import]

Thanks! I look forward to trying this out myself. [import]uid: 70708 topic_id: 15825 reply_id: 129664[/import]

Thanks! I look forward to trying this out myself. [import]uid: 70708 topic_id: 15825 reply_id: 129664[/import]