我正在開發phonegap應用程序。我使用的是使用jQuery的下一個HTML代碼,以顯示與包括hashtag #beavercreek通過hashtag顯示instagram圖片排除已知用戶
<html>
<head>
<title>Instagram test</title>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css" />
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"></script>
</head>
<body>
<script src="instagramfeed.js"></script>
<div class="instagramfeed"></div>
</body>
</html>
而且Instagram的圖片,這是instagramfeed.js的代碼歸檔
$(function() {
$.ajax({
type: "GET",
dataType: "jsonp",
cache: false,
url: "https://api.instagram.com/v1/tags/beavercreek/media/recent/?access_token=ACCESS_TOKEN_NUMBER",
success: function(data) {
console.log(data);
for (var i = 0; i < 15; i++) {
var date = new Date(parseInt(data.data[i].created_time) * 1000);
$(".instagramfeed").append("\
<img src='" + data.data[i].images.standard_resolution.url +"' />\
<div>"+date.getDate()+"/"+(date.getMonth()+1)+"/"+date.getFullYear()+"</div>\
<div><strong>"+data.data[i].user.username+"</strong> "+data.data[i].caption.text+"</div><br /><br />\
");
date = null;
}
}
});
});
我想那結果顯示帶有這個hashtag(beavercreek)的instagram圖片,但不包括來自已知用戶名的圖片。有誰能夠幫助我?。
非常感謝。
你確定這是JAVA代碼? – luanjot
AJAX,對不起。謝謝。 – user2851282