1
我已經看了一圈,我似乎無法找到答案,我需要我的訪問令牌持續時間超過它目前的2小時。除非你能夠建議另一種獲得json結果的方法。由於擴展Facebook訪問令牌javascript
繼承人我的代碼
//first define a function
//include two files where rows are loaded
//1.js
$.ajax({
type: 'GET',
crossDomain: true,
dataType: 'json',
url: 'https://graph.facebook.com/v2.3/147733805246675?fields=posts&access_token=CAACEdEose0cBALZA1JuPZCO5MW3WZAX2ERa3RJ7PA5QKawTRGH9Yg0tdv4ENVJeZAqFchh9mNJuHu75gKv6QkHj63ezAZBGUm1OnpHWurJM4Aa0J71hFsCr27ZCSz43IuYs7QoBomtHVJCiex6ZBRZAovNybDf5XhfyaPNt5CHhvAhnoSZAXFO8q8c2na1ndztlp1zY2ftvsc9QVZCboEwdLAQnZA4zejYvM7kZD',
success: function(json) {
//var json = $.parseJSON(data);
for (var i = 0; i < json.posts.data.length; i++) {
var section = json.posts.data[i].message;
$("#tableid").append("<tr><td style='width:70px'><img id='theImg' src='img/fb.png'/></td><td><b>" + section +
"</b></td></tr>");
}
},
error: function(error) {
console.log(error);
}
});