0

我正在尝试使用图形路径从我的应用程序中读取所有帖子: /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 用 MY_APP 拍了 4 张照片”,这很棒。但是当我尝试从 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 上该帖子中的一个对象。如果可能,如何在不分组的情况下访问所有操作?

4

1 回答 1

0

您需要使用不同的端点:/me/<app_namespace>:<action_name>

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

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

于 2013-08-06T16:00:15.090 回答