Add additional headers to the wp_remote_get () function.
-
Hi all,
I tried to retrieve JSON data from a public instagram account using:wp_remote_get()from the public url:$url = https://www.instagram.com/USER/?__a=1.But what I don’t understand is the following:
If I am connected to my Instagram account from my browser, the
https://www.instagram.com/USER/?__a=1link opens and displays the JSON result.On the same browser, I test my Plugin which calls the same URL
https://www.instagram.com/USER/?__a=1but this time with thewp_remote_get()function , the request returns the Login page .My questions :
Do I have to add the Instagram cookie with my request?
do I need to add specific headers to the functionwp_remote_get()?thank you all
The topic ‘Add additional headers to the wp_remote_get () function.’ is closed to new replies.