Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/215.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/facebook/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
朋友不喜欢在Android中使用图形API_Android_Facebook_Facebook Graph Api - Fatal编程技术网

朋友不喜欢在Android中使用图形API

朋友不喜欢在Android中使用图形API,android,facebook,facebook-graph-api,Android,Facebook,Facebook Graph Api,我试图通过android应用程序在graph api中获得朋友喜欢的东西。我可以在不指定字段属性的情况下获取好友id、姓名。像这样/我/朋友 Session.openActiveSession(this, true, new Session.StatusCallback() { @Override public void call(Session session, SessionState state, E

我试图通过android应用程序在graph api中获得朋友喜欢的东西。我可以在不指定字段属性的情况下获取好友id、姓名。像这样/我/朋友

Session.openActiveSession(this, true, new Session.StatusCallback() {

            @Override
            public void call(Session session, SessionState state,
                    Exception exception) {
                // TODO Auto-generated method stub
                Log.d("zumbvare", session.getPermissions().toString());

                if (session.isOpened()){

                    Request.newMeRequest(session, new Request.GraphUserCallback() {

                        // callback after Graph API response with user object
                        @Override
                        public void onCompleted(GraphUser user, Response response) {
                          if (user != null) {


                            /*TextView welcome = (TextView) findViewById(R.id.welcome);
                            welcome.setText("Hello " + user.getName() + "!");*/
                          }
                        }
                      }).executeAsync();

                    new Request(
                            session,
                            "/me/friends",
                            null,
                            HttpMethod.GET,
                            new Request.Callback() {
                                public void onCompleted(Response response) {
                                    /* handle the result */

                                    Log.d("Zumbare", response.toString());
                                    fbResponse=response.toString();
                                    GraphObject graphObject = response.getGraphObject();
                                    if (graphObject != null){
                                        JSONObject jsonObject = graphObject.getInnerJSONObject();
                                        try{
                                            JSONArray array = jsonObject.getJSONArray("data");
                                            Friend f;
                                            for (int i = 0; i < array.length(); i++) {

                                                f= new Friend();
                                                 JSONObject object = (JSONObject) array.get(i);
                                                 Log.d("Zumbare", "id = "+object.get("id"));
                                                 f.setID(String.valueOf(object.get("id")));
                                                 Log.d("Zumbare", "id = "+object.get("name"));
                                                 f.setName(String.valueOf(object.get("name")));
                                                 /*JSONArray a = object.getJSONArray("likes");
                                                 Log.d("Zumbare", "likes count : "+a.length());
                                                 f.setLikes(String.valueOf(a.length()));*/
                                                 friendList.add(f);

                                              }
                                            Log.d("Zumbare", "Friend list count : "+friendList.size());
                                        }catch (JSONException e) {

                                            e.printStackTrace();
                                           }
                                    }
                                }
                            }
                        ).executeAsync();
                }






            }




        });
我可以将权限字符串日志作为

[public_profile, basic_info, user_relationships, user_location, user_likes, user_activities, user_friends, user_about_me, user_status, user_tagged_places]
有人能帮我找到喜欢的朋友吗


TIA

您只能检索同样在应用程序中授予“用户喜好”权限的好友的喜好。

您不能。API v2.0中删除了所有好友的权限。实际上,我正在寻找接受我的应用并登录的好友,而不是所有实际的FB好友。你是说我的应用程序本身的好友权限不可能吗?
[public_profile, basic_info, user_relationships, user_location, user_likes, user_activities, user_friends, user_about_me, user_status, user_tagged_places]