浅谈Instagram账户授权的sandbox沙盒模型邀请用户

  •   
  • 1244
  • php
  • 38
  • dodobook
  • 2017/03/02

最近在做一个关于国外社交平台的账号绑定的接口调试工作。新建项目填写授权,接口实现等会有新的篇幅来完整的介绍。详情请见文章的底部友情链接。

这一篇主要讲邀请新用户参与到沙盒模式的简单实现。Manage Clients创建好之后,我们需要管理我们的客户端的相关信息。开发阶段我们都是以sandbox模式作为环境,且sandbox是必须的。当然沙盒模式也是有很多限制的(如下图所示)。Users will need to accept the invitation to become sandbox users. You can invite up to 10 users and each user can be invited to 5 apps.

Instagram_sandbox_user_1

我按照相关的说明文档把我自己的个人账号添加进去,这个时候我们就发现有一种状态是pending(待定)状态。那应该是有个通知或者邮件给我提示并通过啊。但是我马不停蹄的登录了Instagram的网页端和APP端(中途我还花了18大洋买了个翻**墙的应用Shadowrocket,幸好是终生免费的),甚至我还登录了邮箱等。但是没发现任何邀请的提示信息。一头雾水。

之后我只能尝试访问一些手动的链接,这个链接就很像 https://www.instagram.com/developer/clients/sandbox_invites/ 之后跳出下面的页面,乍一看还以为要注册另外一个开发应用呢。其实是使自己成为开发者。这个时候我填写了下面的信息,信息手机号都可以随意填写。之后我提交就顺利通过了。

Instagram_sandbox_user_2

再次去访问这个 https://www.instagram.com/developer/clients/sandbox_invites/ 的时候出现了如下图。哈哈哈。果断同意Accept啊。

Instagram_sandbox_user_3

之后我就顺利的进入了沙盒模式,成为了一枚开发者。可以进行相关的授权和拉取相关分feeds流等了。

附上一段关于沙盒模式的说明文档

Sandbox Users

When you want to start working with the Instagram API Platform, you can register a new app that will start in Sandbox mode.
 Since this mode is meant for development, apps in Sandbox mode are not visible to the general public, 
 but instead are only visible to a limited set of up to 10 authorized 'sandbox users'. 
 Only these users will be able to test and authenticate your app.

To manage the list of sandbox users for a given app, you can go to the Sandbox tab in your client configuration screen. 
There you will be able to add and remove the sandbox users for your app, up to a maximum of 10 users. 
Note that the admin of the app is always a sandbox user, so you can effectively add up to 9 additional 'sandbox users'.

After adding users to the list, they will have to accept your invitation before actually becoming sandbox users. 
To accept the invitation, they can go to the 'Sandbox Invites' button on the top bar of the developer site. 
In the 'Sandbox Invites' page people can accept or reject invitations, and also stop being sandbox users for a given app.

Note: a user can become a sandbox user of up to 5 apps. 
You will not be able to invite someone that is already a test user of 5 apps.

友情链接:Instagram账户授权绑定的PHP流程及DEMO

靠自己生活,灵魂也是安宁的---平凡的世界