Instagram ruby gem - Unable to reach callback URL

自闭症网瘾萝莉.ら 提交于 2019-12-02 06:14:12

问题


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

回答1:


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.




回答2:


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.




回答3:


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



来源:https://stackoverflow.com/questions/6701969/instagram-ruby-gem-unable-to-reach-callback-url

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!