来自Android的Facebook Score API调用不会在Timeline / Ticker上显示高分 [英] Facebook Score API calls from Android not displaying high scores on Timeline/ticker

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

问题描述

我正在尝试获得一个Android应用程序,将高分榜发布到Facebook,类似于Facebook上的愤怒的小鸟(它在时间轴上显示,并在Ticker中显示)。请记住,此游戏仅在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. 当用户按得分100分发送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显示在您的时间表上显示最高分 - 失败(无任何高分记录无

  • Open Facebook to see updates from the game, but nothing is displayed anywhere, unlike Angry Birds which shows up on your timeline and shows the highest score - fail (no record of any high scores anywhere
  • 您可能需要的信息:


    • 应用程序类别设置为游戏

    • 应用程序类型设置到网页(本地人不允许我正确发布新的得分)

    • 我正在尝试的用户是应用程序的所有者

    • 尝试使用沙箱打开和关闭上述步骤

    • 如果我打电话给 https://图.facebook.com / USER_ID /分数具有相应的access_token和用户ID,我得到以前发送的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

    问题是为什么它不会显示在feed / timeline中的任何位置/股票。我错过了什么吗?

    推荐答案

    根据文档官方教程,您正确地发布了您的分数。所以,输入我们的下一个问题:为什么不显示在您的用户的Ticker或Timeline?

    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?

    答案是,游戏像愤怒的手段鸟类发布高分实际上是在得分机制之间混合并直接发布到用户的流。 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表示,获得最多点击,喜欢和
    评论的故事将获得更多的分发新闻Feed和时间线。

    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调用不会在Timeline / Ticker上显示高分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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