4

Actually i am accessing list of 25 pages which i have liked ( in my whole facebook accessing duration ) by

String graphPath = "me"
Bundle bun = new Bundle();
bun.putString("fields", "music.fields(name,videos.fields(name))");  
mAsyncRunner.request(graphPath, bun, "GET", object, null);

from where i received data which i have displayed in my listView & there is also a JsonObject ( paging ) which is associated with :

https://graph.facebook.com/100002420343415/music?fields=name,videos.fields%28name%29&access_token=CAAGjblaPDxoBAMH5FZBhdbJoJNALA0IiRGBgxLlWxlLixxTtxMUPVeo0AMkM1ZAFLZAOT7urdd1HeP1LQPJVsTSM9LDcnRUyABjSAxOHuljzRwkcbTHsPDloeA9CmZBMNPywubLPdz7PDrqaT3AC7MVxNHYLJh5tVhKI8tlAaZBoIWGGMhNKF&limit=25&offset=25&__after_id=219447808080269

After receiving this , i want to access those pages which are present between limit=25&offset=25&__after_id=219447808080269 for this i am using

Bundle bun = new Bundle();
bun.putString("fields", "music.fields(name,videos.fields(name))");  
bun.putString("limit","25");
bun.putString("offset","25");
bun.putString("__after_id","219447808080269");
mAsyncRunner.request(graphPath, bun, "GET", object, null);

After performing this , i am getting the same data as 1st 25 Search , i have also tried this ,

Bundle bun = new Bundle();
bun.putString("fields", "music.fields(name,videos.fields(name)&limit=5000&offset=5000&__after_id=206483212727507)");    

but i found here that i have to change the path of graphPath so i have set this graphpath as me/music

thanks , tushar .

Tushar Pandey
  • 4,557
  • 4
  • 33
  • 50

2 Answers2

1

This something will help :

Bundle bun = new Bundle();

bun.putString("fields", "music.fields(name,videos.fields(name)).limit(10)." +
        "access_token("+facebook.getAccessToken()+").offset(10).__after_id(265025693519613)");
Tushar Pandey
  • 4,557
  • 4
  • 33
  • 50
0

I am not exactly sure of it but I was trying a similar query

me/music?__after_id=108196079208151

in the graph explorer and it was not working properly but if I execute this

me/music?offset=1

then it works perfectly. I think that offset and __after_id are conflicting in some way.

As a tip first check the results on graph api explore.

MARK
  • 2,302
  • 4
  • 25
  • 44