Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook Image URL gets expired

I am pulling Facebook posts using facebook-graph API, now the problem is Image gets expired after few days.

I have the following URL for a single Image

Old Image URL which got expired

https://scontent-a.xx.fbcdn.net/hphotos-xfp1/v/l/t1.0-9/p180x540/14377_340369866155028_6836158858133154924_n.jpg?oh=7ed0d8818ad54fac851b036d24f5e674&oe=55579EE3

New Image working URL Is

https://scontent-sin1-1.xx.fbcdn.net/hphotos-xfa1/v/l/t1.0-9/14377_340369866155028_6836158858133154924_n.jpg?oh=2f7ad72fa36fc026ad2bdcc1b0284146&oe=55C87432

I am frustrated with this issue, what could be the solution of it?

like image 245
Chiragkumar Thakar Avatar asked May 27 '15 09:05

Chiragkumar Thakar


People also ask

Do Facebook image links expire?

you can not store facebook Images url for a long time, it expires for security purpose, so it would be a better solution to store images in your server.

What does it mean URL signature expired?

An expiring link, also called signed URL, is a link to a file or object that is limited in time. Once it expires, the link is no longer valid. This has to advantage that the link cannot be used on another site since it expires in any given time by the rightful owner of the link.


1 Answers

What i came to know from other community about this issue is

"You should not store Facebook CDN URLs for long time use – they can change over time.

Either request the actual image and copy that to your server – or request the current CDN URL regularly.

(You might be tempted to try other workarounds, like extracting the actual image source URL from the CDN link, but I would advise against that – because the format of that might change at any time as well.)"

like image 73
Chiragkumar Thakar Avatar answered Sep 28 '22 21:09

Chiragkumar Thakar