我使用瀏覽器登錄了Instagram。我想從Instagram註銷。我如何以編程方式存檔?如何從Android登出Instagram?
2
A
回答
4
您可以使用下面的代碼清除瀏覽器的cookie來使其退出
CookieSyncManager.createInstance(ogout.this);
CookieManager cookieManager = CookieManager.getInstance();
cookieManager.removeAllCookie();
希望這對你有所幫助
+0
你的代碼的最小解釋? –
4
你可以使用這個庫登錄,提示退出就叫mApp.resetAccessToken();
https://github.com/thiagolocatelli/android-instagram-oauth
和webview.use以下屬性清除的WebView會話和數據。
WebSettings mWebSettings = webview.getSettings();
mWebSettings.setSavePassword(false);
mWebSettings.setSaveFormData(false);
webView.clearCache(true);
webView.clearHistory();
或使用
android.webkit.CookieManager.getInstance().removeAllCookie();
或
重置HTTP會話 CookieSyncManager cookieSyncMngr = CookieSyncManager.createInstance(context);
CookieManager cookieManager = CookieManager.getInstance();
cookieManager.removeAllCookie();
How to clear cookies and cache of webview on Android when not in webview?
+0
removeAllCookie depraated –
相關問題
- 1. Instagram登出API
- 2. 如何用Javascript登錄Instagram?
- 3. 如何從Android應用登出Facebook
- 4. Instagram登錄
- 5. instagram登錄hello.js
- 6. instagram如何實現其登錄屏幕?
- 7. 如何從代碼隱藏登錄到Instagram?
- 8. Android Instagram
- 9. Android Facebook登出
- 10. Instagram調用API登錄
- 11. php instagram api登錄錯誤
- 12. 與Instagram原生登錄API
- 13. Phantom.js登錄instagram頁面
- 14. Instagram沒有oAuth登錄
- 15. Instagram的登錄電話ios
- 16. 用php curl登錄instagram
- 17. Android的Instagram如何使用offline_access?
- 18. Android:如何使Instagram的分頁API
- 19. Android Instagram API:如何檢索圖片
- 20. 如何在Android中製作Instagram Listview?
- 21. Android Instagram API
- 22. Instagram的彈出
- 23. 如何從Android上的Instagram API獲取圖片拍攝日期?
- 24. 如何從Instagram用戶名中獲取Instagram電子郵件?
- 25. 如何列出從Instagram的應用程序
- 26. 如何從Android登錄網站?
- 27. 從Android上啓動Instagram應用程序
- 28. Android的Facebook登出
- 29. 如何從instagram api獲取'id'參數?
- 30. 如何從Instagram API使用JSON?
瀏覽器或第三方庫? –
使用瀏覽器.. –