什么是Instagram的API回调网址,以及如何能实现我这 [英] What is callback url in instagram api and how to can I implement it

查看:438
本文介绍了什么是Instagram的API回调网址,以及如何能实现我这的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是初学编程的

我想使用的Instagram的照片实时更新的API

I'm trying to use instagram's realtime Photo Updates api

我的目的是使用这个API控制台的认购方式结果
https://apigee.com/console/instagram

My purpose is use this API CONSOLE's subscription method
https://apigee.com/console/instagram

但我无法理解和处理回调URL

But I can't understand and handle callback url

什么是回调URL的功能?

What is the callback url's function?

和我怎样才能实现回调网址?

And How can I implement the callback url?

推荐答案

回调网址(也被称为 REDIRECT_URL ),是URL的Instagram会向用户发送为他们已登录到Instagram的,并授权您的应用程序读取数据。

The "callback url" (also referred to as redirect_url), is the URL Instagram will send users to after they have logged into Instagram, and authorized your application to read their data.

这是的OAuth 2规格,该Instagram的(和许多其他)的使用来控制访问的一部分他们的API。

This is part of the OAuth 2 Spec, which Instagram (and many others) use to control access to their API.

在2 OAuth的流的短版本是这样的:

The short version of the OAuth 2 "flow" is this:


  • 您发送用户的Instagram的网页与应用程序ID和重定向URL。

  • 用户登录到自己的Instagram网页上,并授权您的应用程序。

  • 那么Instagram的将发送用户返回到您的应用程序(使用重定向URL值),使用令牌,你可以用它来访问他们的数据一起。

GitHub等href=\"https://developer.github.com/v3/oauth/\" rel=\"nofollow\">优秀导游到OAuth如何运作自己的服务器,你会发现在一个

GitHub has an excellent guide to how OAuth works on their server, which you will find very similar to Instagram's.

所以回调URL应设置为您的应用程序服务器的URL。例如, http://myapp.com/auth 。或者,如果你是在本地工作,你可以使用的http://本地主机:3000 / AUTH

So the "callback url" should be set to the URL of your application server. For example, http://myapp.com/auth. Or, if you are working locally, you would use http://localhost:3000/auth.

注意:随着Instagram的(以及大多数其他API),回调URL将被永久在您注册的客户端设置。所以,你会经常必须为你的在线服务器,你的地域的一方创建单独的客户端。

Note: With Instagram (as well as most other APIs), the callback URL is permanently set when you register your client. So you'll often have to create separate clients for your live server, and your local one.

这篇关于什么是Instagram的API回调网址,以及如何能实现我这的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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