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
New Image working URL Is
I am frustrated with this issue, what could be the solution of it?
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.)"
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.
http://prntscr.com/h2fe45 here's the part that stays the same and that's all you need to get it every time the link is changed. I saved images back in 2013 and I still can access them.Its almost 2018.
来源:https://stackoverflow.com/questions/30477877/facebook-image-url-gets-expired