开发者

Highscores list for facebook app

Hello i have a small app on facebook called typepractice (url) and im trying to do a highscore system. I store the score in a scores object and save its id and user id in users object, like this:

// setting score
$scoreID = $facebook->api_client->data_createObject("scores", array("score" => 100) );
$userID = $facebook->api_client->data_createObject("users", array("userid" => $user) );
$facebook->api_client->data_removeHashKey("users",md5($user));
$hash = $facebook->api_client->data_setHashValue("users",md5($user),$scoreID,"scoreid");

// reading score
$query="SELECT score FROM app.scores WHERE _id = ".$facebook->api_client->data_getHashValue('users',md5($user),'scoreid');
$result = $facebook->api_client->fql_query($query); 

I need to build a list of 10 friend and their scores and list of 10 users of the 开发者_如何学Pythonapp and ther score. Is that posibble? The documentation is really confusing.


You can stop thinking about this, data store is now deprecated on facebook and will be gone Q1 2011.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜