Instagram API - 在我的应用程序中重定向 Uri

Instagram API - Redirect Uri in my app

我正在尝试在我的 android 应用程序中使用 instagram api,他们使用 oauth2 进行身份验证。他们要我提供重定向 uri。我研究了 Whosebug 和 google 但仍然不明白该怎么做。

ps..没有网页什么的

重定向 URL 旨在供 Instagram 在通过其网站成功登录后使用。

来自他们的documentations

[Upon successful authentication] The server will redirect the user in one of two ways that you choose:

  • Server-side flow (recommended): Redirect the user to a URI of your choice. Take the provided code parameter and exchange it for an access_token by POSTing the code to our access_token url.

  • Implicit flow: Instead of handling a code, we include the access_token as a fragment (#) in the URL. This method is less secure, but allows applications without any server component to receive an access_token.

根据您的问题判断,您目前没有必要的后端来利用上述服务器端流程。

因此,您可以选择执行此操作 "implicitly",这并不严格要求重定向 URL。知道这一点后,将任何字符串放入重定向 URL 字段.

应该是安全的