Jon*_*ant 0 https oauth node.js instagram
完整的错误是这样的:
events.js:160
throw er; // Unhandled 'error' event
^
Error: getaddrinfo ENOTFOUND https://api.instagram.com https://api.instagram.com:443
at errnoException (dns.js:28:10)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:79:26)
Run Code Online (Sandbox Code Playgroud)
我得到错误的代码是这样的:
var express = require('express');
var app = express();
var https = require('https');
app.get('/oauth/ig', function (req, res) {
var options = {
hostname: 'https://api.instagram.com',
path: '/oauth/access_token?client_secret=myClientSecret&grant_type=authorization_code&redirect_uri=http://localhost:1992/oauth/ig&code='+req.query.code,
method: 'POST',
};
var igRequest = https.request(options, (response) => {
res.send("response");
});
})
Run Code Online (Sandbox Code Playgroud)
我正在使用 nodejs 并且正在尝试进行 Instagram OAUTH。
| 归档时间: |
|
| 查看次数: |
3466 次 |
| 最近记录: |