how to logout completely from instagram account from my website

僤鯓⒐⒋嵵緔 提交于 2019-12-24 22:04:48

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!