3

Iam trying to execute this code but it shows error in

Results results =facebookClient.executeMultiquery(sessionKey, Results.class,
                MultiqueryParameter.with(queries));

I know I haven't declared session key but I read that it's use is in old RestAPI and know only access token is used.So I'm a little bit confused of giving session key. So can anyone help me

FacebookClient facebookClient =
              new DefaultFacebookClient("appid", "scrtkey");

String friendsQuery ="SELECT page_id FROM page_fan WHERE uid=id" ;
Map<String, String> queries = new HashMap<String, String>();
queries.put("friends", friendsQuery);

Results results =facebookClient.executeMultiquery(sessionKey, Results.class,
                MultiqueryParameter.with(queries));

class Results 
{

    List<User> users;

    List<Group> groups;
}

class Group
{

 Long id;

 String name;
}

class User
{

 String name;

}
Jhanvi
  • 5,069
  • 8
  • 32
  • 41
kaduva
  • 55
  • 1
  • 6

0 Answers0