简体   繁体   English

我怎样才能让所有不使用我的应用程序或不通过我的应用程序登录的 Facebook 朋友

[英]How can i get all facebook friends who is not using my app or not login through my app

Currently i am using facebook sdk 4.4 and i am want to fetch all the facebook friend list who is not uses my app.目前我正在使用 facebook sdk 4.4,我想获取所有不使用我的应用程序的 facebook 好友列表。

I have written below code:我写了下面的代码:

GraphRequestBatch batch = new GraphRequestBatch(
                        GraphRequest.newMyFriendsRequest(token,
                                new GraphRequest.GraphJSONArrayCallback() {
                                    @Override
                                    public void onCompleted(JSONArray jsonArray,
                                                            GraphResponse response) {

                                        try {

                        //my code
                                            }

                                        } catch (JSONException e) {
                                            e.printStackTrace();
                                        }

                                    }
                                }), GraphRequest.newMeRequest(token,
                        new GraphRequest.GraphJSONObjectCallback() {

                            @Override
                            public void onCompleted(JSONObject object,
                                                    GraphResponse response) {
                                System.out.println("meJSONObject: "
                                        + object);

                                System.out.println("meGraphResponse: "
                                        + response);


                            }
                        }));
                batch.addCallback(new GraphRequestBatch.Callback() {
                    @Override
                    public void onBatchCompleted(GraphRequestBatch graphRequests) {
                        // Log.i(TAG, "onCompleted: graphRequests "+ graphRequests);
                    }
                });
                batch.executeAndWait();

From above code it is give my the list of friends who is using my app.从上面的代码中,它给了我正在使用我的应用程序的朋友列表。

But i want the list of friends who is not using my app or not login through my app.但我想要不使用我的应用程序或未通过我的应用程序登录的朋友列表。

How can i do this?我怎样才能做到这一点?

As of the new graph, it is only possible to get friends who also uses the app从新图表开始,只能得到也使用该应用程序的朋友

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM