Hello Alex,
I updated to today to 8.4.6 and checked the authenticate.php file to see if the above code we built was included. I can see that it is not and if I add it, I get an error.
I see that your the change logs for 8.4.6 state instagram long-lived token, so my question is, did you find a better place for the long-lived access token snippet to live?
Thanks
DM