-3
我需要更换与file_get_content卷曲(我已删除敏感信息):更换卷曲与file_get_content
curl -F 'client_id=aaa' \
-F 'client_secret=bbb' \
-F 'grant_type=authorization_code' \
-F 'redirect_uri=http://testtest.altervista.org/instagram/' \
-F 'code=ccc' \
https://api.instagram.com/oauth/access_token
我tryed这一点,但好好尝试一下工作(它返回任何结果):
$url = 'https://api.instagram.com/oauth/access_token?client_id=aaa&client_secret=bbb&grant_type=authorization_code&redirect_uri=http://testtest.altervista.org/instagram/&code=ccc';
print json_decode(file_get_contents($url));
为什么?
当您在浏览器中运行该URL时,您会得到什么? – Exception
您正在用php file_get_contents替换'shell'cURL命令......您在这里的真正目标是什么? – YvesLeBorg
当你在URL中有一个URL时,内部URL必须是'urlencode()'。如果您什么都没有收到,那么显示错误日志或至少显示调用返回的标题和状态代码会很有帮助。 – DanFromGermany