Skip to content
This repository has been archived by the owner on May 3, 2021. It is now read-only.

images are not showing on all feed #61

Open
Anmartawfik opened this issue Apr 27, 2021 · 26 comments
Open

images are not showing on all feed #61

Anmartawfik opened this issue Apr 27, 2021 · 26 comments

Comments

@Anmartawfik
Copy link

Looks like images are not showing in any feed , seems like same CORS issue

Many thanks
A

@nguyenhc-bitvn
Copy link

nguyenhc-bitvn commented Apr 27, 2021

Same issue. Waiting for fixing...

@SpbSprut
Copy link

Same issue. Even examples on plugin's site don't show images but only texts.
https://www.sowecms.com/demos/InstagramFeed/#examples
https://prnt.sc/124z128

@ghost
Copy link

ghost commented Apr 27, 2021

@jsanahuja, any suggestions about this issue? Attempts to access images via direct links return 403 with "URL signature expired" message:

403:
image

The message:
image

Also as far as I concerned, the issue with CORS and image access can be reproduced while your computer connects to some internet-endpoints (e.g. Wi-Fi).

@A1exMoody
Copy link

Yep.. Look like this
image
The problem is also shown in the examples

@xchopin
Copy link

xchopin commented Apr 28, 2021

ugh I thought the problem was due to my apache cache thing; good to know I am not alone

@Nicolas-Cargo
Copy link

I hope @jsanahuja will come soon :/ I'm using it on so many websites..

@A1exMoody
Copy link

Me too...
I have to pass the order, but it all comes down to Instagram. I don't want used Insta API...

@CobeSean
Copy link

Adding myself on here, to follow for (hopefully) a solution soon...

@NosovN
Copy link

NosovN commented Apr 28, 2021

@jsanahuja, help us)

@Eugene1984
Copy link

@jsanahuja Adding myself here.

1 similar comment
@igoluciano
Copy link

@jsanahuja Adding myself here.

@NoOneDesign
Copy link

same problem on all website where i use it. @jsanahuja if you fix it give me your paypal, you need a donation for this.

@nrayann
Copy link

nrayann commented Apr 29, 2021

@jsanahuja is the repo alive?

@evaleries
Copy link
Contributor

evaleries commented Apr 30, 2021

If you have Cloudflare account you can fix this issue using Cloudflare workers by following these steps
https://gist.github.com/restyler/6c51e3ad20d7596e799d76e87cf93236

I've tried and it works.

@vgavrilovikj
Copy link

Was someone able to fix this issue..?

@ghost
Copy link

ghost commented Apr 30, 2021

As mentioned here we can use rapidapi as proxy. But there're limitations: 100 requests/month with free plan. There're a bunch of API's, but they have even harder limit: 20 requests/month or 20 requests/day.

@ribeiroeder
Copy link

Hello, not wanting to be negative, but I believe that it will be very unlikely to find a solution since instagram is very strict in unauthenticated access.

As I have several sites that depend on a smilar script, I searched and improved two scripts that use the new official method via the graph.instagram API.

The first uses javascript and the second PHP cURL, I am still testing it but the results have been great.

@ribeiroeder
Copy link

jQuery Ajax for feed Instagram Graph API
https://github.com/ribeiroeder/jquery-feed-instagram-graph

PHP cURL for feed Instagram Graph API
https://github.com/ribeiroeder/php-curl-instagram-graph

@jsanahuja Sorry for posting another third party solution here, your script is incredible, much more complex and well developed than the scripts above and it helped me for a long time. But either way I need to be generating alternatives because customers keep asking about a solution :(

@A1exMoody
Copy link

If you have Cloudflare account you can fix this issue using Cloudflare workers by following these steps
https://gist.github.com/restyler/6c51e3ad20d7596e799d76e87cf93236

I've tried and it works.

This is a good solution to the problem, but what if I have a hosting that is already optimized for everything you need, and I don't need to use Cloudflare?

@evaleries
Copy link
Contributor

evaleries commented May 1, 2021

If you have Cloudflare account you can fix this issue using Cloudflare workers by following these steps
https://gist.github.com/restyler/6c51e3ad20d7596e799d76e87cf93236
I've tried and it works.

This is a good solution to the problem, but what if I have a hosting that is already optimized for everything you need, and I don't need to use Cloudflare?

Good question. You can create Cloudflare workers for free (100k requests/daily) and then you need modify a little bit of the library (See #62).
Let's say you have created Cloudflare workers, you can use my modified version of this library. Then, you need customize the instance of InstagramFeed a little bit, e.g

new InstagramFeed({
    'username': 'travisci',
    'container': document.getElementById("instagram-feed5"),
    'display_profile': true,
    'cdnUrlResolver': function(url) {
        return 'https://your-cloudflare.workers.dev/' + url;
    }
});

Check my live demo:
Main Site - Check Latest Instagram section
https://pemro.id/plugins/insta-feed/insta-feed.js
https://pemro.id/plugins/insta-feed/InstagramFeed.min.js - This uses my modified version of this library

@A1exMoody
Copy link

Если у вас есть учетная запись Cloudflare, вы можете решить эту проблему с помощью работников Cloudflare, выполнив следующие действия:
https://gist.github.com/restyler/6c51e3ad20d7596e799d76e87cf93236
Я пробовал, и он работает.

Это хорошее решение проблемы, но что, если у меня есть хостинг, который уже оптимизирован для всего, что вам нужно, и мне не нужно использовать Cloudflare?

Хороший вопрос. Вы можете создать воркеров Cloudflare бесплатно (100 тыс. Запросов в день), а затем вам нужно будет немного изменить библиотеку (см. № 62 ).
Допустим, вы создали воркеров Cloudflare, вы можете использовать мою модифицированную версию этой библиотеки . Затем вам нужно немного настроить экземпляр InstagramFeed, например

новый  InstagramFeed ( { 
    'username' : 'travisci' , 
    'container' : document . getElementById ( "instagram-feed5" ) , 
    'display_profile' : true , 
    'cdnUrlResolver' : function ( url )  { 
        return  'https: // your- cloudflare.workers.dev/ '  +  url ; 
    } 
} ) ;

Проверьте мою живую демонстрацию:
Основной сайт - проверьте последний раздел **Instagram **
https://pemro.id/plugins/insta-feed/insta-feed.js
https://pemro.id/plugins/insta-feed/InstagramFeed.min.js - Здесь используется моя модифицированная версия этой библиотеки

Yes, but if I understand correctly, will I still need to migrate my domain's dns to cloudflare?

@evaleries
Copy link
Contributor

Yes, but if I understand correctly, will I still need to migrate my domain's dns to cloudflare?

No, You don't need to do that. Migrate your domain to Cloudflare is optional. But, If you need your cdn to be customized to your domain, then you need migrate your domain to Cloudflare (e.g: cdn.your-domain.com) as pointed No 1 on tutorial.

@A1exMoody
Copy link

Yes, but if I understand correctly, will I still need to migrate my domain's dns to cloudflare?

No, You don't need to do that. Migrate your domain to Cloudflare is optional. But, If you need your cdn to be customized to your domain, then you need migrate your domain to Cloudflare (e.g: cdn.your-domain.com) as pointed No 1 on tutorial.

awesome! Thx for ur solution )

@ribeiroeder
Copy link

@evaleries great solution! Could you share the configuration inserted in your cloudflare worker?

I tested it here just by creating one, and the default settings return me the 404 error.

@evaleries
Copy link
Contributor

@evaleries great solution! Could you share the configuration inserted in your cloudflare worker?

I tested it here just by creating one, and the default settings return me the 404 error.

@ribeiroeder First of all, I don't know your default settings. As far as I know if you copy the whole script on tutorial, you can't directly access the workers (It will says 404 Bad url). The workers require Instagram's post url. So the final example would be: https://your.workers.dev/Instagram_post_url
e.g Check this link structure

@ribeiroeder
Copy link

Yes, the script is assembling the url correctly, see here

Similar to your worker, but it seems to be missing some configuration within the cloudflare worker to not return the 404

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests