阻止Facebook在Graph API中对Open Graph操作进行分组?

时间:2013-07-30 22:55:27

标签: facebook facebook-graph-api opengraph facebook-opengraph

我正在尝试使用图表路径阅读我的应用中的所有帖子:  /me/home/filter=app_MY_APP_ID

在返回的数据中,我的一些操作组合在一起,例如:

actions =     (
            {
        link = "https://www.facebook.com/735475141/posts/10153036942300142";
        name = Comment;
    }
);
application =     {
    //deleted for app privacy
};
"created_time" = "2013-07-30T14:41:24+0000";
from =     {
    id = 735475141;
    name = "Can Poyrazo\U011flu";
};
id = "735475141_10153036942300142";
privacy =     {
    value = "";
};
type = link;
"updated_time" = "2013-07-30T14:41:24+0000";
}

当我采取行动(https://www.facebook.com/735475141/posts/10153036942300142)时,我看到4张照片分组,故事标题为“X拍了4张带MY_APP的照片”,这很棒。但是当我尝试从Graph API访问该帖子对象时,我只收到一个帖子:

{
  "id": "10153036942300142",
  "from": {
    "name": "Can Poyrazoğlu",
    "id": "735475141"
  },
  "start_time": "2013-07-29T17:46:22+0000",
  "end_time": "2013-07-29T17:46:22+0000",
  "publish_time": "2013-07-29T17:46:22+0000",
  "application": {
    //removed for privacy
  },
  "data": {
    "photo": {
      "id": "557831850941984",
      "url": "https://www.facebook.com/photo.php?fbid=10153036942105142",
      "type": //removed for privacy
      "title": ""
    }
  },
  //...
}

我在网站上看到的“分组项目”帖子似乎只引用了Graph API中该帖子中的一个对象。如果可能,如何在不进行分组的情况下访问所有操作?

1 个答案:

答案 0 :(得分:0)

您需要使用其他端点:/me/<app_namespace>:<action_name>

这将返回您的应用针对给定操作和给定用户发布的所有操作。例如,使用用户访问令牌:

https://graph.facebook.com/me/my_cooking_app:bake?access_token=...