Facebook的图形API / ME /朋友不要返回谁授权的应用程序所有的朋友? [英] Facebook graph API /me/friends not returns all friends who authorized app?

查看:301
本文介绍了Facebook的图形API / ME /朋友不要返回谁授权的应用程序所有的朋友?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

长冲浪我已经意识到图形API / ME /朋友后只返回此人的朋友谁也使用app.anyway我需要有经验的有一个

任何可能获取一个用户的所有朋友?

我用下面的code核实后获取用户的朋友和认可现在我的第二个查询 user_friends 通过Facebook的团队许可,还我记录与 user_friends 的权限。

  / *使API调用* /
        新GraphRequest(
                AccessToken.getCurrentAccessToken(),
                /我的/朋友
                空值,
                HttpMethod.GET,
                新GraphRequest.Callback(){
                    公共无效onCompleted(GraphResponse响应){
                     / *处理结果*
                    }
                }
        ).executeAsync();

响应

  {响应:响应code:200,graphObject:{摘要:{TOTAL_COUNT:572},数据:[]},错误:空} 。

我在我的名单朋友的也使用相同的应用程序,但没有得到他们的信息,你也可以在上面的反应只能看到 TOTAL_COUNT 正在返回。

什么错,谁能帮助我吗?

更新

一些调试,现在我只得到一个朋友的细节反应,而我有朋友比使用app.why它不会返回其他朋友的详细经过多?任何想法?

此外,当我与访问令牌调试器调试,它告诉用户具有 user_friends scope.still没有得到预期的回应。


解决方案

如果您在现有的应用程序更新权限,然后退出用户将不得不注销和新的新的code权限的重新登录。

After a long surf i have realized Graph API /me/friends only returns the person's friends who also use the app.anyway i need answer from an experienced one

Any possibility to fetch all friends of a user ?

Now my second query I have used the following code for fetching friends of a user after verifying and approved user_friends permission by team facebook and also I'm logging in with the user_friends permission.

 /* make the API call */
        new GraphRequest(
                AccessToken.getCurrentAccessToken(),
                "/me/friends",
                null,
                HttpMethod.GET,
                new GraphRequest.Callback() {
                    public void onCompleted(GraphResponse response) {
                     /* handle the result *
                    }
                }
        ).executeAsync();

Response

{Response:  responseCode: 200, graphObject: {"summary":{"total_count":572},"data":[]}, error: null}.

I have friends in my list whose also uses the same app but ain't get their information also you can see in the above response only total_count were returning.

What's going wrong, Can anyone help me out ?

Update

After some debugging now I'm getting only details of single friend in response while i have friends more than that whose using the app.why it won't return the other friends details ? any idea ?

Also when i debugged with Access Token Debugger, it tells that the user have user_friends scope.still ain't get the expected response.

解决方案

If you are updating permissions in an existing application then exiting users will have to logout and login again with new set of permissions with new code.

这篇关于Facebook的图形API / ME /朋友不要返回谁授权的应用程序所有的朋友?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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