Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/53.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
Ruby on rails instagram公共媒体获取404错误_Ruby On Rails_Ruby_Instagram_Instagram Api - Fatal编程技术网

Ruby on rails instagram公共媒体获取404错误

Ruby on rails instagram公共媒体获取404错误,ruby-on-rails,ruby,instagram,instagram-api,Ruby On Rails,Ruby,Instagram,Instagram Api,遇到非常奇怪的问题同一个Instagram API在过去几个月一直在工作,现在它停止工作两天,并通过404错误,下面是代码: INSTA_BASE_WEB_URL = "https://www.instagram.com" INSTA_BASE_URL = "https://api.instagram.com" def get_public_images username, params endpoint = "#{username}/media" http_respo

遇到非常奇怪的问题同一个Instagram API在过去几个月一直在工作,现在它停止工作两天,并通过404错误,下面是代码:

INSTA_BASE_WEB_URL = "https://www.instagram.com"
INSTA_BASE_URL = "https://api.instagram.com"

def get_public_images username, params
      endpoint = "#{username}/media"
      http_response = HTTParty.get("#{INSTA_BASE_WEB_URL}/#{endpoint}", query: params)
      if http_response&.code == 200
        begin
          return JSON.parse(http_response.body)
        rescue
        end
      end
      return nil
    end

您是否检查了API中是否有更改? 根据我在中的理解,端点应该是:

https://api.instagram.com/v1/users/{user-id}/media/recent/?access_token=ACCESS-TOKEN

您是否检查了API中是否有更改? 根据我在中的理解,端点应该是:

https://api.instagram.com/v1/users/{user-id}/media/recent/?access_token=ACCESS-TOKEN