Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/220.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 从graph api获取好友喜欢数_Android_Facebook_Facebook Graph Api - Fatal编程技术网

Android 从graph api获取好友喜欢数

Android 从graph api获取好友喜欢数,android,facebook,facebook-graph-api,Android,Facebook,Facebook Graph Api,我正在尝试用下面的代码从android中的graph api中获取朋友喜欢的东西 Bundle params = new Bundle(); params.putString("fields", "id,name,likes.limit(500)"); new Request(session,"/me/friends",params,HttpMethod.GET, new Request.Callback() { @Override public

我正在尝试用下面的代码从android中的graph api中获取朋友喜欢的东西

Bundle params = new Bundle();
params.putString("fields", "id,name,likes.limit(500)");
    new Request(session,"/me/friends",params,HttpMethod.GET, new Request.Callback() {
    @Override
                public void onCompleted(Response response) {
                    // TODO Auto-generated method stub

                    Log.d(TAG, "fb response :"+response.toString());


                }
            }).executeAsync();
通过计算like的数据数组的大小,我得到了like的计数。但我无法获得完整的likes计数,因为graph api响应包含有限的数据,这是因为它的分页概念适用于大响应,并且包含after和before的链接

"paging":-{"cursors":-{"after":"MjAwMDA4MTEwMDI2OTcy",
"before":"MTQ2NzAyNTk5Njg3OTMyNw=="
}
}

那么有没有办法只得到喜欢的朋友数呢?

你不能得到喜欢的朋友数,你也不能得到喜欢的朋友数。好友权限永久消失,请查看更改日志:

否,无法仅获取计数。我还认为在android应用程序中查询所有喜欢你的朋友是一个非常糟糕的主意,因为很多数据都有可能被传输。。。