0

我想在我的基于 Corona 的应用程序中的 Candy Crush 中实现类似的活动提要,但我找不到任何好的解决方案。如果有人对此有任何想法,请帮助我。

PS 欢迎任何关于开放图 Facebook 的建议。

4

1 回答 1

0

I'm not using Corona SDk, but what I found is the following:

You could use the facebook.request() function (http://docs.coronalabs.com/api/library/facebook/request.html) to make a request to the Facebook Graph API.

Assuming that you already gathered the relevant permission ("publish_actions") from the user for your app, you could make use of the Scores API (https://developers.facebook.com/docs/score/) and the Achievements API (https://developers.facebook.com/docs/games/achievements/) to post to the Users timeline like described here:

https://developers.facebook.com/blog/post/539/

You can post a score like this:

facebook.request("https://graph.facebook.com/me/scores?score=USER_SCORE&access_token=APP_ACCESS_TOKEN", "POST")

where USER_SCORE is the actual score and APP_ACCESS_TOKEN is the App Access Token for you app.

For achievements, you have to create an achievement first, as described in the above links. Once this is done, you can can post an achievement like this:

facebook.request("https://graph.facebook.com/me/achievements?achievement=YOUR_ACHIEVEMENT_URL&access_token=APP_ACCESS_TOKEN", "POST")
于 2013-09-12T15:03:41.010 回答