10
A
回答
6
如果您使用的是PHP/HTML,我會將隱藏的IMG元素與SRC屬性指向Instagram註銷URL。
7
您可以在自己的「註銷」頁面中使用iframe。例如:
<iframe src="https://instagram.com/accounts/logout/" width="0" height="0" />
您可能想要在執行註銷後重定向到主頁面。
希望有幫助。
-1
您可以使用ajax調用,它可以爲您提供另一個好處,即在發生HTTP錯誤時由於任何原因您會得到異常,並且您可以找到它已註銷或者出現任何http錯誤。如果成功,您可以運行一些代碼來顯示或隱藏頁面上的任何組件,而無需刷新頁面。
$.ajax({
url: "https://instagram.com/accounts/logout/",
success: function (data) {
},
error: function (e) {
alert('Error::' + e.responseText);
//in case of any error you can put some code here.
}
});
6
如果Bhavik小號的回答並沒有爲你工作,像我一樣,因爲XFrame選項被設置爲SAMEORIGIN,嘗試將註銷在圖像的src:
<img src="http://instagram.com/accounts/logout/" width="0" height="0" />
+0
很好的答案。加載圖像沒有限制,因爲註銷是一個GET請求,這只是起作用。 –
相關問題
- 1. Instagram API iOS客戶端可能註銷Instagram
- 2. 如何在PHP中註銷Instagram API?
- 3. Instagram api用戶
- 4. 我如何關注&取消關注使用Instagram API的Instagram用戶
- 5. 如何使用Google+ API註銷用戶?
- 6. Instagram註銷不適用於iPhone?
- 7. Thinktecture隱式流:註銷/註銷用戶
- 8. Twitter API - 註銷
- 9. Braintree註銷用戶
- 10. Laravel用戶註銷
- 11. 註銷 - Taleo用戶
- 12. Django用戶註銷
- 13. Sharepoint用戶註銷
- 14. Instagram的API - 搜索用戶
- 15. Instagram的API用戶位置
- 16. 使用Instagram API在Instagram中獲取用戶的關注者數量
- 17. Instagram Api註冊問題
- 18. Instagram API關注限制?
- 19. Instagram API:關注問題
- 20. Instagram API - 如何檢索用戶在Instagram上關注的人員列表
- 21. Angularfire用戶註冊,登錄,註銷和REST api
- 22. 用於註銷用戶
- 23. 從LinkedIn註銷API
- 24. Desire2Learn Valence API註銷
- 25. Salesforce REST API註銷
- 26. 返回用戶按照關注者排序Instagram API
- 27. 如何在Instagram API中獲取用戶關注者?
- 28. 強制用戶註銷
- 29. ASP網頁註銷用戶
- 30. 強制註銷用戶laravel
工作太棒了!謝謝 –
我試了一下,但是這個錯誤在框架中被拋出https://www.instagram.com/accounts/logout/,因爲它將'X-Frame-Options'設置爲'SAMEORIGIN' –