Instagram API를 사용하여 사용자의 배열을 따라 (ID를 통해) 시도하고 있습니다. 여기에 문서화 된 마지막 종점을 사용하고 있습니다 : http://instagram.com/developer/endpoints/relationships/. 요청을 보낸 후 일부 데이터가 다시 수신됩니다 (코드 : 200, 수신 _ 상태 : "없음", 발신 _ 상태 : "없음"). 여기 Instagram API : 따라 가기 문제
는 코드 (jQuery로 자바 스크립트)입니다 : 나는 액션 =으로도, 데이터 배열과 URL에 동일한 access_token과 퍼팅의 몇 가지 순열을 시도var access_parameters = {action:"follow"};
for (key in users) {
if (users.hasOwnProperty(key)) {
var username = key;
var instagramUrl = "https://api.instagram.com/v1/users/"+users[key][0]+"/relationship?access_token=[ACCESS_TOKEN]"; //where users[key][0] is the id of the user intended to follow and [ACCESS_TOKEN] is my access token
$.ajax({
type:"POST",
async: false,
dataType: 'jsonp',
url: instagramUrl,
contentType: 'text/plain; charset=UTF-8',
data: access_parameters
}).done(function (data) {
if(console && console.log) {
console.log(data); //this is where the above data comes through
}
});
}
}
"에 따라 ". 엔드 포인트가 조치 매개 변수를 수신하지 않고 단순히 현재 관계의 상태를 리턴하는 것 같습니다.
앱을 등록 할 때 관계 범위를 제공 했습니까? incoming_status : "none", outgoing_status : "none"은 인스 타 그램 전송 요청이지만 유효하지 않은 권한 때문에 발생합니다. –
POST 메소드를 사용하지 말아야합니다. 값에 대해 follow를 매개 변수로 사용하여 조치를 추가해야합니다. 관계에 대한 액세스를 요청하지 않고 관계 끝점에 액세스 할 수 없으므로 양식을 작성해야합니다. 저도 같은 문제가 있기 때문에 양식을 작성해주세요. – hadi