0

我发现了这个问题,它完全符合我的要求,但 Facebook 类已被弃用,取而代之的是 Facebook Graph API。我无法理解 Facebook 提供的文档,所以如果有人可以提供帮助,将不胜感激!

4

3 回答 3

0
public void getIds(){
    Session session = Session.getActiveSession();
    String fqlQuery = "select uid from user where uid in (select uid2 from friend where uid1 = me())";
    Bundle params = new Bundle();
    params.putString("q", fqlQuery);
    Request request = new Request(session, "/fql", params, HttpMethod.GET,
            new Callback() {

                @Override
                public void onCompleted(Response response) {

                    Log.d("List of id's", "response = "+response);
                }
            });
    Request.executeBatchAsync(request); 
}
于 2013-02-03T12:18:33.627 回答
0
public void getIds(){
            Session session = Session.getActiveSession();
            String query = "select uid from user where uid in (select uid2 from friend where uid1 = me())";
            Bundle params = new Bundle();
            params.putString("q", query);
            Request request = new Request(session, "/me/friends", params, HttpMethod.GET, new Request.Callback() {

                        @Override
                        public void onCompleted(Response response) {

                            Log.d("Id's :", "Response = "+response);
                        }
                    });
            Request.executeBatchAsync(request); 
        }
于 2014-01-17T10:15:01.017 回答
0

我建议查看支持 Graph API 的Facebook Android SDK (由 Facebook 支持)。

它有一个可以满足您需求的 Android FriendPicker 示例。

于 2013-02-03T10:45:50.270 回答