简体   繁体   English

Unity SDK中的FB.API不发布分数

[英]FB.API in the Unity SDK does not post scores

I'm currently trying to get score posting onto a facebook wall, through Unity. 我目前正在尝试通过Unity将分数发布到Facebook墙上。 I'm using a simple test case seen below, however it does not currently post anything. 我正在使用下面看到的一个简单的测试用例,但是当前没有发布任何内容。 The FBResult in the callback function returns with no error, and "true" as the result text. 回调函数中的FBResult返回没有错误,并且结果文本为“ true”。 Additionally the login process is being completed correctly, and the permissions have been given by the user account. 此外,登录过程已正确完成,并且权限已由用户帐户授予。 The only thing I can think of, is that I need to submit a review to get access to the full publisher_access permission. 我唯一能想到的是,我需要提交评论才能获得对完全Publisher_access权限的访问权。 However I was under the impression that this would not be necessary for testing the application on my developer account(?) 但是我给人的印象是,这对于在我的开发人员帐户上测试应用程序不是必需的(?)

Either way any help in this matter would be much appreciated! 无论哪种方式,都将不胜感激! Thanks! 谢谢!

if(!FB.IsLoggedIn)
    FacebookManager.Instance.Logon();

Dictionary<string, string> scoreData = new Dictionary<string, string> {{"score", 10.ToString()}};

FB.API ("/me/scores", Facebook.HttpMethod.POST, OnPost, scoreData);

Calling FB.API( "/me/scores", ... ) doesn't post anything to the wall. 调用FB.API( "/me/scores", ... )不会在墙上张贴任何东西。 It's a not custom, story call, which is published on facebook under Recent activity . 这不是一个自定义的故事调用,它在Facebook的“ Recent activity下发布。 You can find it on the left, at the very bottom of your profile page. 您可以在个人资料页面底部的左侧找到它。

在最近活动中评分信息

The more tricky part is that it is up to facebook, whether anything will be posted there anyway. 更棘手的部分是,取决于Facebook,无论是否会在此发布任何内容。 Facebook itself chooses whether or when to show anything, taking into consideration the amount of app overall users, amount of submitted scores, application popularity. Facebook本身会根据应用程序总体用户数量,提交的分数数量和应用程序受欢迎程度来选择是否或何时显示任何内容。 For my application, it has taken some time to these activities to start appearing. 对于我的应用程序来说,这些活动花了一些时间才开始出现。

The only thing you can do to make sure that you're posting it correct and that it will start working when Facebook want it to start working, is to checking manually whether the scores are actually submitted. 您唯一可以做的就是确保您正确地发布了分数并在Facebook希望它开始工作时开始工作,这是手动检查分数是否真正提交。 You can do this by calling: 您可以通过致电:

FB.API ("/YOUR_APP_ID/scores/",Facebook.HttpMethod.GET, ScoresCallback );

When the result contains your posted scores it means that everything is working correct and you cannot do anything more - you can only wait for the app popularity to increase. 当结果包含您发布的分数时,表示一切正常,并且您无能为力-您只能等待应用受欢迎程度提高。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM