Facebook Connect - 让用户的朋友得分 [英] Facebook Connect - get users friends score
问题描述
根据多个来源,你应该需要要做的是一个API调用:
facebookConnectPlugin.api('/ me / scores',['user_friends'],function (回应){
});
由于此应用程序的当前权限(来自访问令牌调试):
public_profile,basic_info,read_stream,email,publish_actions,user_friends,user_games_activity
但我得到的答复总是一样的:
{
/ pre>
数据:[
],
总结:{
total_count:39
}
}
如果我使用
/ {appid} / scores
我得到:{
data:[
{
user:{
id 147555555555,
name:Snowden Luke
},
score:1005,
application:{
name:DFdfdf ,
namespace:dfdfdfd,
id:5205555555583
}
}
]
}
(它的我!)
任何帮助? >
解决方案根据 https://developers.facebook.com /docs/graph-api/reference/v2.1/app/scores#readperms
/ {app- id} / scores
返回
这个Facebook游戏为用户和他们的朋友分数。
所以,这似乎是正确的端点为你。关于权限,文档说
需要用户访问令牌来查看该用户从生成令牌即可。如果user_friends的权限已被授予,它也会返回朋友的分数。
问题:
- 你确定你的朋友使用相同的应用程序并发布分数吗?
- 您是否使用正确的访问令牌相同的应用程序,从分数来自)?
Hi can someone please tell me (Im using Facebook Connect Plugin for Phonegap) how I can get the users friends scores?
according to multiple sources all you should need to do is an API call to:
facebookConnectPlugin.api( '/me/scores', ['user_friends'], function( response ) {
});
as the current permissions for this app are (from access token debug):
public_profile, basic_info, read_stream, email, publish_actions, user_friends, user_games_activity
but the response I get is always the same:
{
"data": [
],
"summary": {
"total_count": 39
}
}
and if I use /{appid}/scores
I get:
{
"data": [
{
"user": {
"id": "147555555555",
"name": "Snowden Luke"
},
"score": 1005,
"application": {
"name": "DFdfdf",
"namespace": "dfdfdfd",
"id": "5205555555583"
}
}
]
}
(its me!)
any help?
According to https://developers.facebook.com/docs/graph-api/reference/v2.1/app/scores#readperms
/{app-id}/scores
returns
Scores from this Facebook game for a user and their friends.
so, this seems to be the right endpoint for you. Concerning permissions, the docs say that
A user access token is required to view scores by that user from the app that generated the token. If the user_friends permission has been granted, it will also returns friends' scores.
Questions:
- Are you sure your friends used the same app, and have posted scores?
- Are you using a correct Access Token (generated by the same app from whcih the scores came from)?
这篇关于Facebook Connect - 让用户的朋友得分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!