简体   繁体   中英

Facebook Android sdk 3.1 is returning only 10 friends via FQL?

Previously I used to get entire friends list via GraphObject, but now only 10 are being returned. Is there any work around ?

Here is my code:

        String fqlQuery = "SELECT uid,name,pic_square FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me() )";

        final Bundle params = new Bundle();
        params.putString("q", fqlQuery);

        Request request = new Request(session,  "/fql",  params, HttpMethod.GET, new Request.Callback()

        { 
          public void onCompleted(Response response) 
             {
                //Log.i("listttt:::::", "Got results: " + response.toString());
               try
               {
                GraphObject graphObject = response.getGraphObject();
                JSONObject jsonObject = graphObject.getInnerJSONObject(); 


                Log.v("Fb frn list size:::::", ""+jsonObject .length());  



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

            //Request.executeBatchAsync(request);

        RequestAsyncTask task = new RequestAsyncTask(request);
        task.execute();

If your app was set up before April 30th 2014, you can specify that you explicitly want to use v1.0, which will give you all friends. This will only work until April 30th, 2015. If the app was created later, there's no possibility to get all friends. Have a look on the highlights of FB API upgrade. According to this

https://developers.facebook.com/docs/graph-api

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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