LoginButton询问好友列表的权限,为什么呢? [英] LoginButton asking for friends list permission, why?

查看:158
本文介绍了LoginButton询问好友列表的权限,为什么呢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是内置的LoginButton部件在Facebook的SDK,我没有做我只是将其包含在我的XML布局文件和任何更改呼叫 setSessionStatusCallback 没有其他的。

然而,当我点击登录按钮,Facebook表示,我要求这两个基本信息和好友列表。我有权查看用户的朋友,并期待以后不想虽然LoginButton源好像它不应该被要求要么,它的权限字符串列表是空的。

请告诉我怎么回事?

更新:按要求加入我的code

 最后LoginButton的Facebook =(LoginButton)getView()findViewById(R.id.facebook_login)。
    如果(脸谱!= NULL){
            如果(Utility.getMetadataApplicationId(getActivity())!= NULL){
                facebook.setVisibility(View.VISIBLE);
                facebook.setSessionStatusCallback(新StatusCallback(){

                    @覆盖
                    公共无效呼叫(会话的会话,SessionState会状态,例外的例外){
                        如果(session.isOpened()){
                            showProgress(真正的);
                            Request.executeMeRequestAsync(会话,新GraphUserCallback(){

                                @覆盖
                                公共无效onCompleted(GraphUser用户,响应响应){
                                    Log.d(测试,user.getId());
                                }
                            });
                        }
                    }
                });
            }
    }
 

解决方案

楼盘基本信息+好友列表中的最基本的权限的应用程序可以请求。如果你不提供任何额外的读取权限,那么这两个权限是唯一的,显示了,我不相信你可以删除它们。

我相信我们这样做是因为在与Facebook整合您的应用程序,内在原因是为了让你的应用程序的社会,并为您的应用程序分销渠道。所以,好友列表的权限默认情况下添加,因为你应该使用该权限,鼓励用户与他们的朋友分享你的应用程序,如果他们希望与应用程序请求对话框等操作。

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());
                                }
                            });
                        }
                    }
                });
            }
    }

解决方案

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.

这篇关于LoginButton询问好友列表的权限,为什么呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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