You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 3, 2021. It is now read-only.
I've managed to get the Instagram Feed working, but at times, the console throws an error - *Failed to load resource: the server responded with a status of 400 ()
I have the following script written:
`(function($){
var defaults = {
'username': '',
'container': '',
'display_profile': true,
'display_biography': true,
'display_gallery': true,
'get_raw_json': false,
'callback': null,
'styling': true,
'items': 8,
'items_per_row': 4,
'margin': 0.5
};
$.instagramFeed = function(options){
options = $.fn.extend({}, defaults, options);
if(options.username == "" && options.tag == ""){
console.log("Instagram Feed: Error, no username or tag found.");
return;
}
if(!options.get_raw_json && options.container == ""){
console.log("Instagram Feed: Error, no container found.");
return;
}
if(options.get_raw_json && options.callback == null){
console.log("Instagram Feed: Error, no callback defined to get the raw json");
return;
}
$.ajax({
url: url,
type: 'GET',
success: function (data){
console.log(data.organizations[0].name);
var organisation = data.organizations[0].name;
$("#company").text(organisation);
}
});
$.get(url, function(data){
console.log(data);
data = data.split("window._sharedData = ");
data = data[1].split("<\/script>");
data = data[0];
data = data.substr(0, data.length - 1);
data = JSON.parse(data);`
The script is working and it's displaying the feed, but at times it stops and I have to retry for multiple times until it gets to work again. I've went through all threads and I believe there is no workaround on this case, but any tips at least to mitigate the problem are highly appreciated. I hope the discussion and the code is helpful to other users as well.
Kindest regards,
Georgiy
The text was updated successfully, but these errors were encountered:
Have anyone tried to get the feed in this way? I can see it working on some website this way without issues and a proxy. I'm willing to pay a good amount to anyone that can make this working without a problem. Thanks!
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello,
I've managed to get the Instagram Feed working, but at times, the console throws an error - *Failed to load resource: the server responded with a status of 400 ()
I have the following script written:
`(function($){
var defaults = {
'username': '',
'container': '',
'display_profile': true,
'display_biography': true,
'display_gallery': true,
'get_raw_json': false,
'callback': null,
'styling': true,
'items': 8,
'items_per_row': 4,
'margin': 0.5
};
$.instagramFeed = function(options){
options = $.fn.extend({}, defaults, options);
if(options.username == "" && options.tag == ""){
console.log("Instagram Feed: Error, no username or tag found.");
return;
}
if(!options.get_raw_json && options.container == ""){
console.log("Instagram Feed: Error, no container found.");
return;
}
if(options.get_raw_json && options.callback == null){
console.log("Instagram Feed: Error, no callback defined to get the raw json");
return;
}
$.ajax({
url: url,
type: 'GET',
success: function (data){
console.log(data.organizations[0].name);
var organisation = data.organizations[0].name;
$("#company").text(organisation);
}
});
The script is working and it's displaying the feed, but at times it stops and I have to retry for multiple times until it gets to work again. I've went through all threads and I believe there is no workaround on this case, but any tips at least to mitigate the problem are highly appreciated. I hope the discussion and the code is helpful to other users as well.
Kindest regards,
Georgiy
The text was updated successfully, but these errors were encountered: