我正在使用Instagram API并希望获得代表用户发表评论的许可.但不知怎的,它不起作用.
请求链接:
https://instagram.com/oauth/authorize/?client_id=CLIENT_ID&redirect_uri=REDIRECT_URI&response_type=token&scope=comments+likes
Run Code Online (Sandbox Code Playgroud)
当这个链接打开时,我会被要求获得基本信息和喜欢的许可,但不会评论...

现在,在我授予权限并希望在API中添加注释后,它会返回400错误:
{"meta":{"error_type":"OAuthPermissionsException","code":400,"error_message":"This request requires scope=comments, but this access token is not authorized with this scope. The user must re-authorize your application with scope=comments to be granted write permissions."}}
Run Code Online (Sandbox Code Playgroud)
我究竟做错了什么?是否无法获得评论范围?我这样做就像Instagram在最底层的Instagram身份验证上的这个链接上描述的那样
我在PHP上使用Curl发出了Post请求。instagram API返回带有状态的小json。但是我的代码以某种方式回显了它,因此我想将其传递给变量。
//open connection
$ch = curl_init();
//set the url, number of POST vars, POST data
curl_setopt($ch,CURLOPT_URL, $url);
curl_setopt($ch,CURLOPT_POST, 1);
curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string);
//execute post
$result = curl_exec($ch);
//close connection
curl_close($ch);
Run Code Online (Sandbox Code Playgroud)
为什么它回显或打印$ result而不是仅仅保留它?
我正在尝试使用append(load())将内容附加到Element,但它不起作用.
$('#id').append(load('page.html'));
Run Code Online (Sandbox Code Playgroud)
有没有其他方法可以做到这一点?或者这段代码有什么错误吗?
var tags = new Array();
var tags[4]= new Array();
tags[4].push("Hello");
Run Code Online (Sandbox Code Playgroud)
不知何故,这不起作用,控制台在第二行说有一个意外的令牌......你能以某种方式帮助我吗?它是一个数组内的数组.我简化了代码,因为其余的是正确的.
谢谢