如何从新Instagram API获取访问令牌

如何从新Instagram API获取访问令牌,instagram,instagram-api,instagram-graph-api,Instagram,Instagram Api,Instagram Graph Api,Instagram已经停止了他们的旧API,我正试图在一个网站上显示另一个提要。我无法通过facebook上的测试人员帐户为开发人员创建新的访问令牌,但该访问令牌的格式不同,在我的旧提要上不起作用 我的旧饲料正在使用 我这样称呼它: var userFeed = new Instafeed({ get: 'user', userId: '123123123', limit: 12,

Instagram已经停止了他们的旧API,我正试图在一个网站上显示另一个提要。我无法通过facebook上的测试人员帐户为开发人员创建新的访问令牌,但该访问令牌的格式不同,在我的旧提要上不起作用

我的旧饲料正在使用

我这样称呼它:

var userFeed = new Instafeed({
                get: 'user',
                userId: '123123123',
                limit: 12,
                resolution: 'standard_resolution',
                accessToken: '123123123.testtest.d9128u12u312oijd0',
                sortBy: 'most-recent',
                template: '<div class="gallery instaimg"><a href="{{image}}" title="{{caption}}" target="_blank"><img src="{{image}}" alt="{{caption}}" class="img-fluid"/></a></div>',
            });
var userFeed=new Instafeed({
获取:“用户”,
用户ID:'123123',
限额:12,
决议:“标准决议”,
accessToken:'123123.testtest.d9128u12u312oijd0',
脏话:“最近的”,
模板:“”,
});
新的访问令牌更长,没有点。这是一种完全不同的格式。旧的看起来像这样 123123.testtest.d9128u12u312oijd0

  https://api.instagram.com/oauth/authorize
  ?client_id={instagram-app-id}
  &redirect_uri={redirect-uri}
  &scope={scope}
  &response_type=code
在将程序设置为

它会给你一个代码,比如

RSATsRW.c3rwde...
在那之后你就把它贴出来了

https://api.instagram.com/oauth/access_token \
  -F client_id=990602627938098 \
  -F client_secret=eb8c7... \
  -F grant_type=authorization_code \
  -F redirect_uri=https://socialsizzle.herokuapp.com/auth/ \
  -F code=RSATsRW.c3rwde...
它将为您提供令牌、用户名和id


我是从

中获取的,你用什么来显示你的提要?