Instagram ruby​​ gem - 无法到达回调 URL

发布于 2024-11-24 03:56:19 字数 511 浏览 2 评论 0原文

断断续续地尝试过 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

被你宠の有点坏 2024-12-01 03:56:19

我遇到了同样的问题,

在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.

鲸落 2024-12-01 03:56:19

我也有同样的问题。

似乎 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.

姐不稀罕 2024-12-01 03:56:19

我也有同样的问题。当我不小心重新启动路由器并分配了另一个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).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文