问题
On my website i fetched data using instagram api. Whoever user loggedin his uploaded photos will display on the page. When i click on logout i expire all session like session_destroy(); and session_unset(); and it expires all sessions and redirect to index.php. But when i click on login, it automatically logged in without asking userid and password. I want when i expire session the accounts also logout from instagram. How to do that? here is site link sachanrealityhomes.com/technovidemo/instagram/ (click on Create)
回答1:
Thats cause you have just destroyed your website session, Instagram is still logged in, you have to logout of Instagram. You can logout of Instagram by opening URL: https://instagram.com/accounts/logout
You can do something like this in JS:
var s = document.createElement("script");
s.src = "https://instagram.com/accounts/logout";
$("head").append(s);
来源:https://stackoverflow.com/questions/23646380/how-to-logout-completely-from-instagram-account-from-my-website