Facebook graph API /me/friends not returns all friends who authorized app?

梦想的初衷 提交于 2019-12-11 12:52:36

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/34679376/facebook-graph-api-me-friends-not-returns-all-friends-who-authorized-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!