Images from the facebook API give the "Invalid URL pair parameter" error,

I have thousands of facebook images stored in my database. However, I recently noticed that images stored in the database return this error: "Parameter of invalid URL pair"

It seems that we should not store the URL of facebook images for a long time, as they may expire.

My question is: how can I get a newer image url from the facebook API if the only information I have is the old image url? Perhaps I could extract the specific data id from the old url and then request the facebook API to get the new url?

Here is an example of an old (expired) URL:

https://scontent.xx.fbcdn.net/v/t1.0-9/15380747_1075074945947776_5898791779893134744_n.jpg?oh=7d445f227aa1922bebce375eae991a05&oe=597D1B48 
+5
source share

Source: https://habr.com/ru/post/1273818/


All Articles