LoginButton asking for friends list permission, why?

拈花ヽ惹草 提交于 2019-12-07 03:13:35

问题


I am using the built in LoginButton widget in the facebook sdk, I haven't made any changes to it I just include it in my xml layout file and call setSessionStatusCallback nothing else.

However, when I click the login button facebook says I am asking for both basic info AND the friends list. I do not want permission to view the users friends, and after looking though the source of LoginButton it seems like it shouldn't be asking either, its permissions String list is empty.

Whats going on here?

update: adding my code by request.

    final LoginButton facebook = (LoginButton) getView().findViewById(R.id.facebook_login);
    if(facebook != null){
            if(Utility.getMetadataApplicationId(getActivity()) != null){
                facebook.setVisibility(View.VISIBLE);
                facebook.setSessionStatusCallback(new StatusCallback() {

                    @Override
                    public void call(Session session, SessionState state, Exception exception) {
                        if(session.isOpened()){
                            showProgress(true);
                            Request.executeMeRequestAsync(session, new GraphUserCallback() {

                                @Override
                                public void onCompleted(GraphUser user, Response response) {
                                    Log.d("test", user.getId());
                                }
                            });
                        }
                    }
                });
            }
    }

回答1:


Asking for basic info + friends list is the most basic permissions that an app can request. If you do not supply any additional read permissions, then those two permissions are the only ones that will show up, and I do not believe you can remove them.

I believe we do this because when integrating your app with Facebook, the inherent reason is to make your app social and to provide a distribution channel for your app. So the friends list permission is added by default because you should use that permission to encourage the user to share your app with their friends if they wish to do so with the app requests dialog etc.



来源:https://stackoverflow.com/questions/14077262/loginbutton-asking-for-friends-list-permission-why

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