使用Facebook API,我可以看到我对问题的答案吗?

时间:2012-01-25 08:45:36

标签: facebook facebook-graph-api

我想知道我是如何回答问题的,在某些Facebook群组中我是一名成员。有没有办法使用API​​?

2 个答案:

答案 0 :(得分:2)

请按照以下步骤操作:

<强>首先

您的应用程序需要user_questions和user_groups

的权限

<强>第二

你可以使用多重查询来获取所有问题,答案和选民的基本信息。

<强>第三

使用https://developers.facebook.com/tools/explorer检查数据

最后,请使用此查询:

fql?q={

    "questions":"select id,question from question where owner= me()",

    "options":"select id, question_id, name,votes from question_option WHERE question_id in (select id from #questions)",

    "option_votes":"select voter_id, option_id  from question_option_votes where option_id IN (select id from #options) order by voter_id desc",

    "users":"select uid, name, first_name, middle_name, last_name, sex, locale, pic_small_with_logo, pic_big_with_logo, pic_square_with_logo, pic_with_logo, username from user where uid IN (select voter_id from #option_votes)"
}

注意:字段“uid,name,first_name,middle_name,last_name,sex,locale,pic_small_with_logo,pic_big_with_logo,pic_square_with_logo,pic_with_logo,username”是公共访问权限,不需要令牌< / p>

答案 1 :(得分:0)

您可以查询question_option_votes fql表。

但是,您需要具有相应的权限才能执行此操作:

To read options from the question_option table you need the following permissions:

    user_questions for questions posed by the current user.
    friends_questions for questions posed by friends of the current user.

我怀疑,除非你是该组的管理员,否则你将无法获得该数据。