简体   繁体   English

通过API获取Instagram的当前点赞和关注限制

[英]Getting Instagram's Current Like and Follow Limit Via API

I own a website that automates Instagram actions, currently I'm getting 100 likes/hour and 100 relationship posts/hour (I know it says 60 for relationships but I've been getting 100). 我拥有一个使Instagram动作自动化的网站,目前我每小时获得100个点赞,每小时获得100个关系帖子(我知道它表示60个关系,但我却获得了100个)。 I enforce signed headers, and since I've added my email address I've noticed no 400 errors, just some advice. 我执行签名的标头,并且由于添加了电子邮件地址,所以我没有发现400个错误,只是一些建议。

So my question is, how can I find my current request limit regarding likes and following/unfollowing? 所以我的问题是,我如何才能找到关于喜欢和关注/取消关注的当前请求限制? I know in the header they provide how many requests you've made compared to the 5,000 in one hour, but I want to know specifically when I'm going to get the 429 "OAuthRateLimitException" error, so I don't have to hit this limit every hour, I've noticed after getting this error every hour for hundreds of users, it does not look good for my app. 我知道在标头中,它们提供的请求数量与一个小时内的5,000个请求相比有多少个请求,但是我想特别知道何时会收到429“ OAuthRateLimitException”错误,因此我不必点击我每小时都会收到此限制,对于数百名用户来说,每小时都会收到此错误,但对于我的应用来说,它看起来并不好。

If anyone could tell me how to get how many like requests I've made in the hour, so I can stop before receiving the 429 error, that would be great. 如果有人可以告诉我如何在一个小时内收到多少类似的请求,那么我可以在收到429错误之前停下来,那太好了。 I'm using JavaScript, ajax and PHP to make my calls. 我正在使用JavaScript,ajax和PHP进行呼叫。 Thanks. 谢谢。

You are likely not using Oauth tokens for each user. 您可能没有为每个用户使用Oauth令牌。 By doing so, the rate limit will scale by the number of people using your app. 这样,速率限制将根据使用您的应用程序的人数进行缩放。

As for telling how many you have left, it should be in the HTML header response. 至于告诉您剩下多少,它应该在HTML标头响应中。 From their documentation : 从他们的文档中

HTTP Header HTTP头

Information regarding the global rate limits is included in the HTTP header on the response to each of your calls, which enables your app to determine its current status with respect to these rate limits. 有关全局速率限制的信息包含在对每个调用的响应的HTTP标头中,这使您的应用可以根据这些速率限制来确定其当前状态。 The following fields are provided in the header of each response and their values are related to the type of call that was made (authenticated or unauthenticated): 每个响应的标头中提供了以下字段,它们的值与进行的呼叫类型(已认证或未认证)有关:

X-Ratelimit-Remaining: the remaining number of calls available to your app within the 1-hour window X-Ratelimit-Remaining:在1小时窗口内您的应用可以使用的剩余通话次数

X-Ratelimit-Limit: the total number of calls allowed within the 1-hour window X-Ratelimit-Limit:1小时窗口内允许的呼叫总数

from the manual: 从手册:

HTTP Header HTTP头

Information regarding the global rate limits is included in the HTTP header on the response to each of your calls, which enables your app to determine its current status with respect to these rate limits. 有关全局速率限制的信息包含在对每个调用的响应的HTTP标头中,这使您的应用可以根据这些速率限制来确定其当前状态。 The following fields are provided in the header of each response and their values are related to the type of call that was made (authenticated or unauthenticated): 每个响应的标头中提供了以下字段,它们的值与进行的呼叫类型(已认证或未认证)有关:

X-Ratelimit-Remaining : the remaining number of calls available to your app within the 1-hour window X-Ratelimit-Remaining :1小时窗口内您的应用程序可使用的剩余呼叫数

X-Ratelimit-Limi t: the total number of calls allowed within the 1-hour window X-Ratelimit-Limi t:1小时窗口内允许的通话总数

https://instagram.com/developer/limits/ https://instagram.com/developer/limits/

Global rate limits are applied inclusive of all API calls made by an app over the 1-hour sliding window, regardless of the particular endpoint . 全局速率限制适用于应用程序在1小时的滑动窗口中进行的所有API调用, 无论特定端点如何 The limits are applied independently from each other; 限制彼此独立地应用; authenticated calls are not counted against the rate limit for unauthenticated calls and vice-versa. 已认证的呼叫不计入未认证呼叫的速率限制,反之亦然。

HTTP Header HTTP头

Information regarding the global rate limits is included in the HTTP header on the response to each of your calls, which enables your app to determine its current status with respect to these rate limits. 有关全局速率限制的信息包含在对每个调用的响应的HTTP标头中,这使您的应用可以根据这些速率限制来确定其当前状态。 The following fields are provided in the header of each response and their values are related to the type of call that was made (authenticated or unauthenticated): 每个响应的标头中提供了以下字段,它们的值与进行的呼叫类型(已认证或未认证)有关:

As you can see it's not specific to an endpoint it's based on the overall requests made per access token(if authenticated). 如您所见,它不是特定于端点的,它基于每个访问令牌(如果经过身份验证)发出的总体请求。

So I'm just wondering if it is even possible to check an access tokens current amount of requests specific to a particular endpoint. 因此,我只是想知道是否有可能检查特定于特定端点的访问令牌的当前请求数量。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何发布喜欢或使用instagram api删除instagram之类的instagram? - how to post a like or delete an instagram like using instagram api? 如何更新Instagram令牌以增加API限制 - How to renew Instagram token to increase api limit 获得一个粘性标题来“向上推”,就像在 Instagram 的 iPhone 应用程序中使用 CSS 和 jQuery - Getting a sticky header to "push up", like in Instagram's iPhone app using CSS and jQuery 在没有 API 的情况下获取 Instagram 个人资料的关注者数量 - Getting the followers count of an Instagram profile without an API 从Facebook Page API获取Instagram帐户 - Getting Instagram Account from facebook Page API 通过Javascript获取当前时间 - Getting current time via Javascript Instagram API,/ media / recent仅显示当年的图像吗? - Instagram API, /media/recent shows only images from current year? 我可以通过 JavaScript API 限制放入 S3 的对象的大小吗? - Can I limit the size of an object put into S3 via the JavaScript API? 通过jQuery在Instagram JSON feed中获取未定义的变量 - Getting undefined variable in Instagram JSON feed via jQuery Instagram Graph API拉动,可以运行,但运行缓慢,需要建议 - Instagram Graph API pull, works but runs slow would like advice
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM