通过API打开图表故事

时间:2013-11-07 01:08:38

标签: facebook facebook-graph-api

[质量问题质疑]

我正在尝试拉开朋友发布的有关应用程序的开放图形故事(公开)。我意识到feed的典型过滤机制(me / home?filter = app_321574327904696)不适用于Open Graph Stories。

有人可以帮我找出可以过滤应用程序(或关键字)的OG故事的API吗?

1 个答案:

答案 0 :(得分:1)

此处记录了检索Open Graph操作:https://developers.facebook.com/docs/opengraph/using-actions/#read

您需要获得其希望阅读其操作的用户的user_actions:<APP NAMESPACE>权限,然后您需要对/<USER ID>/<APP NAMESPACE>:<ACTION TYPE NAME>进行API调用以检索操作

例如,要检索用户发布的Pinterest''pin'操作,您需要授予user_actions:pinterestapp权限,然后对/me/pinterestapp:pin进行API调用

我的示例输出开始:

"data": [
    {
      "id": "<REMOVED ID>", 
      "from": {
        "name": "<REMOVED NAME>", 
        "id": "<REMOVED USER ID>"
      }, 
      "start_time": "2013-09-11T00:20:15+0000", 
      "end_time": "2013-09-11T00:20:15+0000", 
      "publish_time": "2013-09-11T00:20:15+0000", 
      "application": {
        "name": "Pinterest", 
        "namespace": "pinterestapp", 
        "id": "274266067164"
      }, 
      "data": {
        "pin": {
          "id": "<REMOVED PIN ID>", 
          "url": "http://pinterest.com/pin/<REMOVED PIN ID>/", 
          "type": "pinterestapp:pin", 
          "title": "TEST"
        }
      }, 
      "type": "pinterestapp:pin", 
      "no_feed_story": false, 
      "likes": {
        "count": 0, 
        "can_like": true, 
        "user_likes": false
      }, 
      "comments": {
        "count": 0, 
        "can_comment": true, 
        "comment_order": "chronological"
      }
    }, 
  [...]