Sourabh Dhiman

Sourabh Dhiman

  • 1.6k
  • 226
  • 6.7k

Not Get Media url .

Nov 6 2019 6:17 AM
<script>
$(document).ready(function () {
var Token = 'EAAkhxEV1Q4IBAEvIEu2DetJ0bOBIm0WVzTZBOoTlPF24ZCgwPu0sk6MZBo3fB8aVdTSpqRXIHwAdBpMIMsv3U2f9GSjUiz3mNUKCQJ0ZC12iINeWqveZAqiZAykJeBlhsuNkkUCYBTZBJMBmi9sljL5fpcRytRAigr4Tj7cQJ9wBQZDZD';
UserID = '17848704268712520';
var InstaMediaUrl = 'https://graph.facebook.com/v5.0/' + UserID + '?fields=media_url%2Cmedia_type&access_token=' + Token;
$.ajax({
InstaUrl: InstaMediaUrl,
dataType: 'jsonp',
data: { access_token: UserID },
success: function (data) {
alert(data);
for (x in data.media_url) {
$('ul').append('<li><img src="' + data.media_url[x].images.low_resolution.url + '"></li>'); // data.data[x].images.low_resolution.url - URL of image, 306?306
}
},
error: function (data) {
console.log(data); // send the error notifications to console
}
});
});
 
This is my media get code instagram . Not run this code please solve this .