来自 Instagram 的帖子未显示在 Facebook Open Graph API 上 [英] Posts from Instagram not showing up on Facebook Open Graph API

查看:43
本文介绍了来自 Instagram 的帖子未显示在 Facebook Open Graph API 上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对 Facebook OpenGraph API 有疑问.每当我使用/home"或/feed"请求数据时,Instagram 上的帖子都没有显示.

I have an issue with Facebook OpenGraph API. Whenever I request data using either '/home' or '/feed', none of the posts from Instagram showed up.

我一直在谷歌搜索,显然有些人提出了同样的问题,但还没有解决方案.我读到一些问题,不仅影响 Instagram 上的帖子,还影响其他第三方应用/设备/平台.

I've been googling around and apparently some people raised the same issue with no solution yet. And I read some that the issue not only affecting posts from Instagram, but also other third-party app/device/platform.

即使是张贴在 Facebook 开发页面上的票也似乎有些死了(没有继续).链接:https://developers.facebook.com/bugs/110563582419837/

Even the ticket posted on Facebook's dev page seems somewhat dead (no continuation). Link: https://developers.facebook.com/bugs/110563582419837/

如果你们中的任何人也偶然发现了这个问题并有一些想法/指针/链接,请分享并讨论.

If any of you guys also stumbled on this issue and has some ideas/pointers/links, please do share and let's discuss it.

非常感谢.干杯!

推荐答案

在 Facebook 的错误跟踪器中有两个关于此的错误报告:https://developers.facebook.com/bugs/110563582419837https://developers.facebook.com/bugs/202119973248747

There are two bug reports in Facebook's bug tracker about this: https://developers.facebook.com/bugs/110563582419837 and https://developers.facebook.com/bugs/202119973248747

核心原因是照片附加到Open Graph动作作为用户生成的照片,而不是通过常规的照片上传 API.

The core reason is that the photos are attached to Open Graph actions as User Generated Photos and not via the regular Photo upload API.

因此,常规照片权限不会授予对它们的访问权限,您需要用户专门允许您访问其发布操作的应用的开放图谱活动.上面的错误报告被接受,因为这似乎是对用户生成的照片的操作的疏忽,但也可能是设计使然,在这种情况下,我在下面概述的解决方法将是唯一受支持的这样做的方法:

As such, the regular photos permissions don't grant access to them and you need the user to specifically allow you the access their Open Graph activity for the app that posted the actions. The bug reports above are accepted on the basis that this appears to be an oversight in the case of actions with user generated photos, but it could also be by design in which case what i've outlined below as a workaround would be the only supported way to do this:

如果您特别需要为用户请求 Instagram(或其他 Open Graph 照片应用)照片,您可以请求 权限 访问该应用发布的操作.

If you specifically need to request Instagram (or another Open Graph photos app) photos for a user, you can ask for Permission to access the actions posted by that app.

对于 Instagram 照片,您可以通过请求 user_actions:instapp 权限来执行此操作,一旦完成,Instagram 照片 相册将不再显示为空,Instagram 活动将显示在 feed 连接中.

For Instagram photos you can do this by requesting the user_actions:instapp permission and once you've done that the Instagram Photos album will no longer appear to be empty, and the Instagram activity will appear in the feed connection.

要查找任意应用程序的命名空间,请访问 https://graph.facebook.com/ 并查找 namespace 字段,

To find out the namespace for an arbitrary app, access https://graph.facebook.com/<APP ID> and look for the namespace field,

例如对于 Instagram,调用 https://graph.facebook.com/124024574287414/?fields=id,namespace 返回:

e.g. for instagram, a call to https://graph.facebook.com/124024574287414/?fields=id,namespace returns:

{
  "id": "124024574287414", 
  "namespace": "instapp"
}

来自我自己的 /feed 连接的示例照片,使用 read_streamuser_photosuser_actions:instapp 检索> 权限,是:

A sample photo from my own /feed connection, retrieved with the read_stream, user_photos, user_actions:instapp permissions, is:

{
  "data": [
    {
      "id": "[SNIPPED]", 
      "from": {
        "name": "[SNIPPED]", 
        "id": "[SNIPPED]"
      }, 
      "picture": "[SNIPPED]", 
      "link": "https://www.facebook.com/photo.php?fbid=[SNIPPED]", 
      "icon": "https://fbstatic-a.akamaihd.net/rsrc.php/v2/yb/x/StEh3RhPvjk.gif", 
      "privacy": {
        "value": ""
      }, 
      "type": "photo", 
      "object_id": "[SNIPPED]", 
      "application": {
        "name": "Instagram", 
        "namespace": "instapp", 
        "id": "124024574287414"
      }, 
      "created_time": "2013-01-07T17:33:04+0000", 
      "updated_time": "2013-01-07T17:33:04+0000", 
      "comments": {
        "count": 0
      }
    }, 

我还可以使用相同的权限访问我的Instagram 照片"相册的 /photos 连接,并且可以在 /me 上访问所有 Instagram 的采取"操作(即照片)/instapp:take

I can also access the /photos connection of my 'Instagram Photos' album with the same permissions, and can access all Instagram 'take' actions (i.e the photos) at /me/instapp:take

这篇关于来自 Instagram 的帖子未显示在 Facebook Open Graph API 上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆