来自 Android 的 Facebook Score API 调用未在时间轴/自动收报机上显示高分 [英] Facebook Score API calls from Android not displaying high scores on Timeline/ticker

查看:22
本文介绍了来自 Android 的 Facebook Score API 调用未在时间轴/自动收报机上显示高分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试让 Android 应用程序将高分发布到 Facebook,类似于 Facebook 上的 Angry Birds 的做法(它显示在时间轴上,也显示在股票代码中).请记住,此游戏仅在 Android 上运行,并且没有 FB Canvas 应用程序.

I'm trying to get an Android app to post highscores to Facebook, similar to how Angry Birds on Facebook does (it get's displayed on Timeline and shows up in the Ticker too). Keep in mind that this game runs only on Android and has no FB Canvas application.

目前我发布高分的步骤如下:

Currently the steps I take for posting the high scores are the following:

  1. 按下登录按钮时通过 FB 对用户进行身份验证,仅请求 publish_actions 权限 - 有效
  2. 通过 FB SDK 调用/me"来请求用户 ID,并将 ID 保存在一个变量中 - 有效
  3. 当用户按下Score 100 points"时,通过 Facebook SDK 发送一个 POST 请求,代码如下: - 有效(通话记录为真)

Bundle params = new Bundle();
params.putString("score", "100");

// appAccessToken is temporarily a constant
facebook.setAccessToken(appAccessToken);

String response = "null";

try {
     response = facebook.request(userId + "/scores", params, "POST");
} catch (IOException e) {
     e.printStackTrace();  
}

// Logs true if successful
Log.d(TAG, response);

  • 打开 Facebook 以查看游戏更新,但任何地方都没有显示任何内容,这与 Angry Birds 不同,它会显示在您的时间线上并显示最高分 - 失败(任何地方都没有任何高分记录
  • 您可能需要的更多信息:

    Some more information you may need:

    • 应用类别设置为游戏
    • 应用程序类型设置为 Web(本机不允许我正确发布新乐谱)
    • 我尝试使用的用户是应用程序的所有者
    • 在打开和关闭沙箱的情况下都尝试了上述步骤
    • 如果我使用适当的 access_token 和用户 ID 调用 https://graph.facebook.com/USER_ID/scores,我得到了之前发送的 100 分分数作为回复,所以分数发布似乎有效
    • Category of application is set to Game
    • Type of application is set to Web (Native didn't allow me to properly post a new score)
    • The user I'm trying with is the owner of the application
    • Tried the above steps with both sandbox on and off
    • If I call https://graph.facebook.com/USER_ID/scores with the appropriate access_token and user id, I get the previously sent 100 point score as a response, so the score posting seems to work

    问题是为什么它没有出现在提要/时间线/自动收报机中的任何地方.我错过了什么吗?

    推荐答案

    根据文档官方教程,您已正确发布分数.那么,请输入我们的下一个问题:为什么它没有显示在您用户的股票代码或时间轴上?

    According to the documentation and the official tutorial, you're published your scores properly. So, enter our next question: why isn't it showing up on your user's Ticker or Timeline?

    答案是,Angry Birds 等游戏发布高分的方式实际上是在评分机制和直接发布到用户流之间的混合.Facebook 控制将在其下发布分数的故事类型和分布,因此您的应用不能保证每次将分数发布到地点.引用主要来源:

    The answer is, the means with which games like Angry Birds publish high scores is actually blended between the score mechanism and posting directly to a user's stream. Facebook controls the story types and distribution under which scores will be published, so your app isn't guaranteed to generate a new story item every time you post a score to the site. Quoting a primary source:

    Facebook 表示获得最多点击次数、点赞次数和评论将在动态消息和时间轴上获得更多传播.

    Facebook says the stories that get the most clicks, likes, and comments will get more distribution in News Feed and on Timeline.

    幸运的是,如果用户允许,您有追索权.如果您认为您的用户非常关心发布他们的高分,您可以请求允许直接发布到他们的信息流,并使用您自己的自定义消息来实现.可以在此处找到更多信息.

    Fortunately, you have a recourse if the user allows it. If you believe your user cares very much about having their high scores published, you can ask for permission to post to their stream directly and do so with your own custom messages. More information can be found here.

    (附加参考)

    这篇关于来自 Android 的 Facebook Score API 调用未在时间轴/自动收报机上显示高分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆