Instagram API - Redirect url

落花浮王杯 提交于 2019-12-11 12:45:59

问题


I have a plugin that need some instagram infos of my application. This plugin just show photo feed.

I have created the application on the instagram developers and get my client id, but, what's the redirect url? I put my website link because i really don't understand what is that.

What i need is:

id: 'MY PROFILE ID',
redirectUrl: 'http://www.kyriosfestival.com.br',
clientId: 'MY CLIENT ID FROM MY APPLICATION',
accessToken: 'GENERATED FROM INTERNET'

And it's not working. I have used a access token generated from internet, and i don't know if is this the problem.

What is the real form to use that?

Anyone? Thanks!


回答1:


Must be late, but will post an answer, so that maybe it will help anyone some day.

For all your Instagram API calls, you need to receive a valid access token.

You can get one by implementing authentication (client-side or server-side), full guide can be found here.

So for example, if you choose to go with client-side authentication, you should direct a user to authentication URL, which will looks like this:

https://api.instagram.com/oauth/authorize/?client_id=CLIENT-ID&redirect_uri=REDIRECT-URI&response_type=token

After that, user will be redirected to your redirect page (REDIRECT-URI). This REDIRECT-URI should match the URL you have specified in Manage Clients section.

After the redirect happens, you will get the access token in the URL of the page you've been redirected to.

http://your-redirect-uri#access_token=ACCESS-TOKEN

You can then extract your ACCESS-TOKEN from url and start making API calls.



来源:https://stackoverflow.com/questions/21681090/instagram-api-redirect-url

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!