Tag: instagram api

GET请求在客户端到服务器给出错误没有'Access-Control-Allow-Origin'

我正在本地主机上运行我的节点/expressionjs应用程序。 我正在向Instagram的api发送'GET'请求,并不断收到此错误: XMLHttpRequest cannot load https://api.instagram.com/oauth/authorize/?client_id=******&redirect_uri=http://localhost:4000/feed&response_type=code. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:4000' is therefore not allowed access. 我在我的服务器中这样请求: app.use(function(req, res, next) { res.header("Access-Control-Allow-Headers: x-requested-with"); res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept"); next(); }); app.get('/',function(req,res){ res.redirect(redirected to feed route); }) app.get('/feed',function(req,response) { var code = req.query.code; var url = "https://api.instagram.com/oauth/access_token"; var options = […]

Instagram的API – 无法获得接受跟踪请求的私人用户的媒体

我在应用程序中使用Instagram API来查看其他Instagram的照片。 如果一个Instagram账号是私人的,那么这些照片就不能被看到,这是有道理的。 但是,如果这个私人Instagram已经接受了请求他们媒体的用户(访问令牌)的请求,那么这个媒体应该是可用的(对吗?),但是在提出请求时我仍然收到错误。 我正在使用这个请求端点: https://api.instagram.com/v1/users/PRIVATE_PROFILE_ID/media/recent/ ?access_token=ACCESS_TOKEN_OF_USER_THAT_IS_ALLOWED_TO_FOLLOW_PRIVATE_PROFILE 不pipe请求的访问令牌是否具有遵循该configuration文件的权限,API是不是授予访问私人configuration文件的简单情况? 这里也提到了一个类似的问题,但没有真正回答

Instagram的新API,通过标签获取项目

上个月,Instagram的API被更新,我不明白如何使用它。 例如,我想通过标签nexus5x获取图像。 我请求https://api.instagram.com/v1/tags/nexus5x?access_token=access_token 和回应是 200“{”meta“:{”code“:200},”data“:{”media_count“:5066,”name“:”nexus5x“}} 你能解释我下一步该做什么吗? 我也试过得到最近的项目 https://api.instagram.com/v1/tags/nexus5x/media/recent?access_token=access_token 但得到这个回应 200“{”pagination“:{”deprecation_warning“:”next_max_id and min_id are used for this endpoint; use min_tag_id and max_tag_id instead,“},”meta“:{”code“:200}”data“:[]} 在沙盒PS应用程序。

通过标签和时间范围查询Instagram的post

我试图通过提供哈希标签和时间范围(自和直到date)从Instagram查询post。 我使用最近的标签端点 。 https://api.instagram.com/v1/tags/{tag-name}/media/recent?access_token=ACCESS-TOKEN 我的代码是使用instagram-node库在Node.js中编写的(请参阅行内注释): // Require the config file var config = require('../config.js'); // Require and intialize the instagram instance var ig = require('instagram-node').instagram(); // Set the access token ig.use({ access_token: config.instagram.access_token }); // We export this function for public use // hashtag: the hashtag to search for // minDate: the since date // […]