1
사용자의 이미지 프로필을 사용자로부터 가져 오려고합니다. 다음과 같이 jquery를 사용하여 ajax 요청을 만듭니다.Google 사용자 콘텐츠 Javascript api
$.ajax({
type: "get",
url: "https://www-opensocial.googleusercontent.com/api/people/myusername/@self",
contentType: "application/json; charset=utf-8",
data: {},
success: function (result) {
image = result.entry.thumbnailUrl;
name = result.entry.displayName;
},
error: function() {
}
});
그러나 405 오류 메시지가 표시됩니다. broswer에서 url을 요청하면 json 객체가 올바로 처리됩니다.
C# .Net의 솔루션도 좋습니다. 감사합니다.
JSON 데이터를 '가져 오려면'$ .getJSON을 사용할 수도 있습니다. 또한 검색하려는 내용에 대한 참조가 있습니까? – m90