Instagram Graph API 有沙盒模式吗?
Does Instagram Graph API has sandbox mode?
docs 说(第 4 步):
In the App Review for Instagram section, click Add to Submission for each permission your App will need from its Users. instagram_basic is required. instagram_manage_comments, instagram_manage_insights, and instagram_content_publish are optional.
Scroll to the bottom of the page, and in the Current Submission sub-section, for each submission, click its View Notes link.
In the View Notes dialogue for each permission submission, provide a description for how you will use the data returned by any endpoints that require the permission, and a screencast showing how your app will use the data.
Once you've completed your notes for all of your permission submissions, click the Submit For Review button at the bottom of the page. Note that this is separate from your App Review, which you will do after testing.
After you've added both Facebook Login and Instagram API products to your app configuration, add Facebook Login to your app and record a screencast showing how you will use data returned by the Instagram API. This is similar to the Facebook Login screencast but with Instagram data, so the same guidelines apply.
第 5 步:
Once you've been notified that your Instagram API product submission has been approved, you can use the Graph API Explorer to test your app.
通过 Facebook 登录,我可以创建一个在沙盒模式下运行的应用程序。这让我可以创建截屏视频。为了能够使用 Instagram Graph API(在网站上)我需要(从我能收集到的):
- 链接到 Instagram 企业帐户的 Facebook 页面
- 一个应用程序图标
- 隐私政策页面
- 一个具有 Facebook 登录功能的网站
- 每个权限将如何使用的描述
- ...的截屏视频到底是什么?一个基本上准备就绪的网站,但不是从 Instagram 获取数据,而是将它们硬编码在代码中?
或者毕竟有沙盒模式?
UPD 我在上面的引文中强调了重要部分。那么:
5. Test Your App
Once you've been notified that your Instagram API product submission has been approved, you can use the Graph API Explorer to test your app.
Go to the Graph API Explorer...
The first call you will make is to the Graph API's /user/accounts edge...
Locate the Page that you connected to the Instagram Business Account and click its ID...
Next, [make /page?fields=instagram_business_account request].
这是我在 Graph API Explorer 中得到空响应的地方(仅返回 id 字段),或者:
200:- OAuthException:(#200) Access to this data is temporarily disabled for non-active apps or apps that have not recently accessed this data due to changes we are making to the Facebook Platform. https://developers.facebook.com/status/issues/205942813488872/
GET /...?fields=instagram_business_account HTTP/1.1
在我的网站上。在通过评论(Instagram 应用评论和 Facebook 应用评论)之前,我可以向 Instagram Graph API 提出哪些请求?
如果您使用开发者帐户登录,您可以获得 Graph 的完整功能API,使用它创建应用功能的视频截屏并提交
从您的开发者帐户转到您的应用仪表板:
https://developers.facebook.com/apps/APP_ID/dashboad
转到:角色 -> 测试用户。
编辑其中一位测试用户,将其密码更改为您想要的密码,以便了解他。
完成后,退出您的个人帐户并连接 https://facebook.com
中的 "test user" 帐户
转到您的应用程序并单击范围为 "instagram_basic" 的 facebook 登录名。
使用您获得的 access_token,您可以向 Graph API 询问有关用户的 Instagram 企业帐户的信息。
Et voilà.
PS:您将无法使用测试用户的 Open Graph API 工具。我的建议是从隐身模式测试您的应用程序,这样它就不会干预您的个人帐户。
更新
目前,以这种方式访问 Instagram 数据已被禁用,但这是访问数据的正确方式。
FB 错误消息说:
(#200) 由于我们对 Facebook 平台所做的更改,非活动应用程序或最近未访问过此数据的应用程序暂时禁止访问此数据。 https://developers.facebook.com/status/issues/205942813488872/
您必须从您的真实应用程序创建一个测试应用程序,这些应用程序默认处于沙盒模式(开发人员模式)https://developers.facebook.com/docs/apps/test-apps/您将能够使用它访问任何 fb 权限/功能,并用它开发产品。准备好审核后,在您提交真实申请时 link 您的测试应用程序正在处理中
看来 Facebook 提供的文档有些误导。实际上,您可以通过 Graph API Explorer(或通过从您的代码发送 GET 请求)以非常有限的方式使用 Instagram Graph API,在您获得第 4 步所述的初始批准之前,仅访问您的 Instagram 商业帐户。
步数:
- 打开图表 API 资源管理器。
- 首先,您需要在 "Access Token" 部分添加额外的权限。该部分底部有一个 "Add a Permission" 下拉菜单。打开该下拉菜单和 select:instagram_basic、manage_pages、business_management 权限。根据您尝试执行的操作,您可能还需要其他权限(例如 instagram_manage_comments、ads_management、manage_pages)。
- select 获得额外权限后,单击 "Get Access Token" 按钮。
- 现在,您拥有具有正确权限的访问令牌,您应该能够执行 instagram_business_account 请求。这将 return 您企业帐户的 instagram id,然后您可以将其用于其他请求。
完成这些步骤后,我可以通过 Instagram Graph API 为我的企业帐户获取媒体,尽管我仍在尝试弄清楚为什么标签请求 return 为空列表。
docs 说(第 4 步):
In the App Review for Instagram section, click Add to Submission for each permission your App will need from its Users. instagram_basic is required. instagram_manage_comments, instagram_manage_insights, and instagram_content_publish are optional.
Scroll to the bottom of the page, and in the Current Submission sub-section, for each submission, click its View Notes link.
In the View Notes dialogue for each permission submission, provide a description for how you will use the data returned by any endpoints that require the permission, and a screencast showing how your app will use the data.
Once you've completed your notes for all of your permission submissions, click the Submit For Review button at the bottom of the page. Note that this is separate from your App Review, which you will do after testing.
After you've added both Facebook Login and Instagram API products to your app configuration, add Facebook Login to your app and record a screencast showing how you will use data returned by the Instagram API. This is similar to the Facebook Login screencast but with Instagram data, so the same guidelines apply.
第 5 步:
Once you've been notified that your Instagram API product submission has been approved, you can use the Graph API Explorer to test your app.
通过 Facebook 登录,我可以创建一个在沙盒模式下运行的应用程序。这让我可以创建截屏视频。为了能够使用 Instagram Graph API(在网站上)我需要(从我能收集到的):
- 链接到 Instagram 企业帐户的 Facebook 页面
- 一个应用程序图标
- 隐私政策页面
- 一个具有 Facebook 登录功能的网站
- 每个权限将如何使用的描述
- ...的截屏视频到底是什么?一个基本上准备就绪的网站,但不是从 Instagram 获取数据,而是将它们硬编码在代码中?
或者毕竟有沙盒模式?
UPD 我在上面的引文中强调了重要部分。那么:
5. Test Your App
Once you've been notified that your Instagram API product submission has been approved, you can use the Graph API Explorer to test your app.
Go to the Graph API Explorer...
The first call you will make is to the Graph API's /user/accounts edge...
Locate the Page that you connected to the Instagram Business Account and click its ID...
Next, [make /page?fields=instagram_business_account request].
这是我在 Graph API Explorer 中得到空响应的地方(仅返回 id 字段),或者:
200:- OAuthException:(#200) Access to this data is temporarily disabled for non-active apps or apps that have not recently accessed this data due to changes we are making to the Facebook Platform. https://developers.facebook.com/status/issues/205942813488872/
GET /...?fields=instagram_business_account HTTP/1.1
在我的网站上。在通过评论(Instagram 应用评论和 Facebook 应用评论)之前,我可以向 Instagram Graph API 提出哪些请求?
如果您使用开发者帐户登录,您可以获得 Graph 的完整功能API,使用它创建应用功能的视频截屏并提交
从您的开发者帐户转到您的应用仪表板: https://developers.facebook.com/apps/APP_ID/dashboad
转到:角色 -> 测试用户。
编辑其中一位测试用户,将其密码更改为您想要的密码,以便了解他。
完成后,退出您的个人帐户并连接 https://facebook.com
中的 "test user" 帐户转到您的应用程序并单击范围为 "instagram_basic" 的 facebook 登录名。
使用您获得的 access_token,您可以向 Graph API 询问有关用户的 Instagram 企业帐户的信息。
Et voilà.
PS:您将无法使用测试用户的 Open Graph API 工具。我的建议是从隐身模式测试您的应用程序,这样它就不会干预您的个人帐户。
更新
目前,以这种方式访问 Instagram 数据已被禁用,但这是访问数据的正确方式。
FB 错误消息说:
(#200) 由于我们对 Facebook 平台所做的更改,非活动应用程序或最近未访问过此数据的应用程序暂时禁止访问此数据。 https://developers.facebook.com/status/issues/205942813488872/
您必须从您的真实应用程序创建一个测试应用程序,这些应用程序默认处于沙盒模式(开发人员模式)https://developers.facebook.com/docs/apps/test-apps/您将能够使用它访问任何 fb 权限/功能,并用它开发产品。准备好审核后,在您提交真实申请时 link 您的测试应用程序正在处理中
看来 Facebook 提供的文档有些误导。实际上,您可以通过 Graph API Explorer(或通过从您的代码发送 GET 请求)以非常有限的方式使用 Instagram Graph API,在您获得第 4 步所述的初始批准之前,仅访问您的 Instagram 商业帐户。
步数:
- 打开图表 API 资源管理器。
- 首先,您需要在 "Access Token" 部分添加额外的权限。该部分底部有一个 "Add a Permission" 下拉菜单。打开该下拉菜单和 select:instagram_basic、manage_pages、business_management 权限。根据您尝试执行的操作,您可能还需要其他权限(例如 instagram_manage_comments、ads_management、manage_pages)。
- select 获得额外权限后,单击 "Get Access Token" 按钮。
- 现在,您拥有具有正确权限的访问令牌,您应该能够执行 instagram_business_account 请求。这将 return 您企业帐户的 instagram id,然后您可以将其用于其他请求。
完成这些步骤后,我可以通过 Instagram Graph API 为我的企业帐户获取媒体,尽管我仍在尝试弄清楚为什么标签请求 return 为空列表。