使用fql查询提取结果

时间:2014-03-18 00:50:21

标签: java facebook facebook-fql restfb

Iam尝试执行此代码,但在

中显示错误
Results results =facebookClient.executeMultiquery(sessionKey, Results.class,
                MultiqueryParameter.with(queries));

我知道我没有声明会话密钥,但我读到它的用法是在旧的RestAPI中,并且只知道使用了访问令牌。所以我对给出会话密钥有点困惑。所以任何人都可以帮助我

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;

}

0 个答案:

没有答案