No permission to access invitable friends

十年热恋 提交于 2020-01-07 05:00:54

问题


I am developing an android game app and want to get a list of Facebook invitable friends.

Unfortunately I hit this error: Response: responseCode: 400, graphObject: null, error: {HttpStatus: 400, errorCode: 100, errorType: OAuthException, errorMessage: (#100) No permission to access invitable_friends.} with code below.

Code

new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/me/invitable_friends",
    null,
    HttpMethod.GET,
    new GraphRequest.Callback()
    {
         @Override
         public void onCompleted(GraphResponse response)
         {
             System.out.println(response);
         }
     }
).executeAsync();

Permissions

List< String> permissionNeeds = Arrays.asList("user_friends");

Can anyone helps me to point out the problems ? Is it caused by missing permission ? Or, I can only get invitable_friends for my game app with Canvas implemenation ?

Thank You. :)


回答1:


Getting user_friends permission requires you to submit your app for facebook devs to review. If you just want the list of friends who have installed your app you can get that without the user_friends permission, by just doing a get call on :

https://graph.facebook.com/fb_id/friends?access_token=...

Reference : https://developers.facebook.com/docs/graph-api/reference/user/friends



来源:https://stackoverflow.com/questions/41805289/no-permission-to-access-invitable-friends

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