Instagram的API。 "无法达到回调URL" [英] Instagram API. "Unable to reach callback url"

查看:497
本文介绍了Instagram的API。 "无法达到回调URL"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好球员,因此这里的设置。我开发一个节日一个网站,需要使用Instragram API。客户想自动加载从Instagram的使用一定的#标签的照片。这里没有问题,Instagram的API支持此功能等等。

Ok guys so here is the setup. I am developing a site for a festival and need to use the Instragram API. The client would like to automatically load pictures from Instagram that use a certain hashtag. No problem here, the instagram API supports this function and many more.

但是,当我试图让订阅(通过卷曲POST操作),我得到一个错误的反应,我的回调网址无法访问。但它是可到达。我可以通过浏览器来上网冲浪没有问题。

But when I try to make a subscription (via a cURL Post Operation) I get an error response that my callback-url is unreachable. But it is reachable. I can surf to it via the browser no problem.

我的卷曲操作是这样的:

My cURL operation looks like this:

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_POST, count($postData));
curl_setopt($ch,CURLOPT_POSTFIELDS,$fields_string);
$result = curl_exec($ch);       
curl_close($ch);    

这是执行上述操作后后,我得到了响应:

and this is the response I get after executing the post operation above:

{元:{ERROR_TYPE:APISubscriptionError,code:400,ERROR_MESSAGE:无法达到回调URL \\... ... myUrl \\} }

{"meta":{"error_type":"APISubscriptionError","code":400,"error_message":"Unable to reach callback URL \"...myUrl...\"."}}

任何Instagram的大师的网上说知道我做错了吗?

Any instagram guru's online that know what I'm doing wrong?

注:我试过在我的两个回调的URL文件/ API认购藏汉如在除了php文件

Note: I've tried to subscribe in both my callback-url file/api aswell as in an apart php file.

推荐答案

如果您使用的是家用电脑开发它确保你的Instagram的服务器提供的回调URL可以到达(从他们身边)

If you're using your home computer to develop it make sure the callback url you provided to instagram's servers can be reached (from their side)

您可以在您的计算机上安装了防火墙(请确保您允许传入的连接)结果
或者尝试在远程服务器上运行的code(如果你没有的话)

You may have a firewall on your computer (make sure you allow incoming connections)
Or try running your code on a remote server (if you're not already)

这篇关于Instagram的API。 "无法达到回调URL"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆