json을 통해 Facebook 그래프 API를 사용하여 json 데이터를 가져 오려고합니다. 아래 코드를 사용하고 있습니다. 나는 $ .getJSON 함수를 사용하여 JSON 데이터를 얻기 위해 노력하고 있지만, 불을 지르고jquery에서 페이스 북 그래프 API에서 데이터를 가져 오는 방법
NetworkError: 400 Bad Request - https://graph.facebook.com/me/home?access_token=mytoken
여기
내 코드
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js">
</script>
<script type="text/javascript" src="script/script.js"></script>
<script>
$(function(){
//$('fb').fbWall();
var url = "https://graph.facebook.com/me/home?access_token=mytoken";
var html = "<ul>";
$.getJSON(url, function(json){
//console.log(json);
$.each(json.data, function(i,fb){
html += "<li>" + fb.id + "</li>";
});
});
html += "</ul>";
$('.fb').animate({opacity: 0}, 500, function() {
$('.fb').html(html);
});
$('.fb').animate({opacity:1}, 500);
});
</script>
<!-- <link type="text/css" rel="stylesheet" href="styles.css" /> -->
<style>
.fb {
width: 400px; height: 400px;
border:1px solid red;
}
</style>
<title>title</title>
</head>
<body>
<div class="fb">
</div>
</body>
</html>
내가 실수를하고있다에서이 오류를 표시? 당신은 당신이 직접 게시 한 URL로 이동하는 경우
액세스 토큰을 게시하면 모든 사용자에게 계정 세부 정보를 볼 수있는 권한이 부여됩니다. – bkaid
올바른 액세스 토큰이 맞나요? –
예 올바른 액세스 토큰입니다. 어떤 단서? – doforumda