You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Facebook:获取OpenGraphStory的Reactions接口调用错误及正确方法

Fixing the Reactions API Error for Open Graph Stories

Got it, let's break down why you're hitting that (#100) error and how to fix it.

Why the Error Happens

The error message spells it out clearly—you're trying to access the reactions field on an OpenGraphAction node, which doesn't support that endpoint. Here's the key context:

  • The open_graph_story you're pulling from page ratings is actually an OpenGraphAction (a user's action like "rated X" or "shared Y").
  • Reactions aren't stored on the action itself—they're attached to the Open Graph Object that the action points to (the actual content the user interacted with).

Correct Steps to Get Reactions

Follow these two steps to retrieve the reactions properly:

  1. Fetch the Open Graph Object ID from the OpenGraphAction
    Modify your initial ratings API call to include the linked object's ID instead of just the action's ID. Use this field parameter:

    {page-id}/ratings?fields=open_graph_story{object{id}}
    

    This will return the ID of the actual Open Graph Object that the story/action is associated with.

  2. Call Reactions on the Object ID
    Once you have the Open Graph Object ID, use it in the reactions endpoint:

    {open-graph-object-id}/reactions
    

    This will work because the reactions field is fully supported for Open Graph Object nodes.

Quick Example

If your modified API response looks like this:

{
  "data": [
    {
      "open_graph_story": {
        "object": {
          "id": "1234567890"
        }
      }
    }
  ]
}

You'd then call 1234567890/reactions to fetch all reactions for that content.

内容的提问来源于stack exchange,提问作者Mat

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.15 04:52:40