我尝试在沙箱中使用instagram API . 我使用Ruby和 gem 'instagram'
但我只能调用方法
Instagram.user_recent_media( {:count => 5})
def user_recent_media(*args)
options = args.last.is_a?(Hash) ? args.pop : {}
id = args.first || "self"
response = get("users/#{id}/media/recent", options)
response
end
喜欢 @instagram = Instagram.user_recent_media( {:count => 5})
我尝试调用其他方法
def follow_user(id, options={})
options["action"] = "follow"
response = post("users/#{id}/relationship", options, signature=true)
response
end
得到
Instagram::BadRequest in HomeController#index
获取https://api.instagram.com/v1/users/[user_ID]/follows.json?access_token=[Access_token]&max_id=10:400:此请求需要scope = follower_list,但此访问令牌未获得授权这个范围 . 用户必须使用scope = follower_list重新授权您的应用程序才能获得此权限 .
有什么方法可以用吗?
1 回答
基本上,您必须在Instagram here注册您的申请,并希望他们接受 . 没有办法解决这个问题 .
这里有一点关于他们如何基本上对第三方应用程序开发人员说的话http://www.businessinsider.com/instagram-made-a-change-that-stopped-lots-of-third-party-apps-from-working-2016-6