Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ionic-framework/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何从Instagram API中获取在选定时间范围内获得和丢失的追随者数量?_Instagram_Instagram Api - Fatal编程技术网

如何从Instagram API中获取在选定时间范围内获得和丢失的追随者数量?

如何从Instagram API中获取在选定时间范围内获得和丢失的追随者数量?,instagram,instagram-api,Instagram,Instagram Api,我需要获得获得和失去的追随者数量,或者只是在选定的时间范围内的追随者总数 例如: 如果我向以下地址发送请求: 我会得到这个Json: { "data": { "username": "kevin", "bio": "CEO & Co-founder of Instagram", "website": "", "profile_picture": "https://instagramimages-a.akam

我需要获得获得和失去的追随者数量,或者只是在选定的时间范围内的追随者总数

例如: 如果我向以下地址发送请求: 我会得到这个Json:

{
    "data": 
    {
        "username": "kevin",
        "bio": "CEO & Co-founder of Instagram",
        "website": "",
        "profile_picture": "https://instagramimages-a.akamaihd.net/profiles/profile_3_75sq_1325536697.jpg",
        "full_name": "Kevin Systrom",
        "counts":  {
            "media": 1419,
            "followed_by": 1138347,
            "follows": 643
    },
    "id": "3"
  }
但我无法在选定的时间范围内获得“后跟”

我阅读了Instagram api文档,但在任何地方都找不到可以执行请求的端点

在媒体中,我可以传递MIN_TIMESTAMP和MAX_TIMESTAMP作为参数,但我不是在寻找媒体,我是在寻找追随者的数量

我知道这是可能的,因为有一个网站,从帐户开始就可以获取所有信息


PS:我已经使用OAuth 2.0进行了身份验证,但没有API可以执行此操作,我认为您必须跟踪您的追随者数量并每天更新。通过API设置一个cron作业来完成此操作


我刚刚试过minter.io,我不知道他们从第一天起是如何显示追随者的,我可以肯定地告诉你这是假的,而且不准确,我在某个时候有大约1400个追随者,几个月前我删除了他们,所以它又回到了200多个,minter.io根本没有显示这一点。我认为他们只是为历史数据显示了一个假线性图,然后他们每天都会跟踪追随者。

可以使用用户节点上的“追随者计数”字段来获取起点。这将给出请求时的跟随者总数。在此基础上,您可以通过从您提到的Insights api中减去每日关注人数来计算运行总数

获取当前跟随者计数:
curl-i-X GET”https://graph.facebook.com/v8/?fields=followers_count&access_token=EAACwX...“

获取一天的新关注者:
curl-i-X GET”https://graph.facebook.com/v8//insights?metric=follower_count&period=day&since=2020-10-5T07:00:01&until=2020-10-06T07:00:00


或者他们可能已经很好地开发了他们的算法。实际上,我也在努力解决这个问题。谢谢!Glady Instagram API已经进化了。当时它还没有。我想他们不会以这种方式返回unfollows,所以需要进一步改进的计数会有点错误。这是真的,我看不出有什么办法可以绕过我是afra身份证件