Instagram ruby gem - 无法到达回调 URL
断断续续地尝试过 instagram-ruby-gem 一些 天 - 无论我做什么,当尝试创建实时 订阅,我得到 https://api.instagram.com/v1/subscriptions.json : 400:无法到达回调 URL - 我始终可以通过 Web 浏览器,我尝试使用 localtunnel 和 heroku 公开 url,但没有 成功。 是否还有其他问题会产生相同的错误消息?任何 还有其他想法吗?
def sub
client = Instagram.client
client.create_subscription(
:object => 'tag',
:callback_url => root_url,
:aspect => "media",
:object_id => "pizza"
)
end
Been experimenting with the instagram-ruby-gem on and off for a few
days - no matter what I do, when a try to create a realtime
subscription, I get https://api.instagram.com/v1/subscriptions.json:
400: Unable to reach callback URL - I can always reach the URL with a
web browser and I've tried exposing the url with both localtunnel and heroku with no
success.
Are there other issues that will produce this same error message? Any
other ideas?
def sub
client = Instagram.client
client.create_subscription(
:object => 'tag',
:callback_url => root_url,
:aspect => "media",
:object_id => "pizza"
)
end
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我遇到了同样的问题,
在heroku中,我只使用一个dyno,回调返回400:无法到达回调URL,因为当instagram回调dyno时,dyno在第一个调用(创建订阅调用)中正忙并返回错误。
对于有同样问题的人,我使用了两个测功机和独角兽。
I had the same problem,
In heroku i was using only one dyno and the callback returned 400: Unable to reach callback URL becouse when instagram called back the dyno was busy in the first call (the create subscription call) and returned error.
For someone with the same problem i used two dynos and unicorn.
我也有同样的问题。
似乎 Instagram 无法到达返回空白页面的 URL。
就我而言,接收调用的脚本存在语法错误,并且使用
error_reporting=off
返回一个空页面。一旦我修复了脚本,Instagram 就开始访问该 URL。I had the same problem.
Seems that instagram doesn't reach the URLs that returns a blank page.
In my case, the script that receives the call had a syntax error and, with
error_reporting=off
, gives back an empty page. Once I've fixed the script, instagram starts to reach the URL.我也有同样的问题。当我不小心重新启动路由器并分配了另一个IP时,它起作用了。 Instagram 似乎可能会阻止某些订阅(在这种情况下,错误消息
无法到达回调 URL
确实具有误导性)。I had the same problem. It worked when I accidentally restarted the router and got another IP assigned. It seems that Instagram might block some subscriptions (and the error message
Unable to reach callback URL
in that case is really misleading).