可能重複:
How to check whether a user is logged into his google account through API?用戶是否登錄Google?
我開發一個網頁,顯示了谷歌日曆。
我的問題是:是否有可能檢測用戶當前是否登錄到Google帳戶?如果有可能(我確信它是這樣),那麼檢測這個最簡單的方法是什麼?
可能重複:
How to check whether a user is logged into his google account through API?用戶是否登錄Google?
我開發一個網頁,顯示了谷歌日曆。
我的問題是:是否有可能檢測用戶當前是否登錄到Google帳戶?如果有可能(我確信它是這樣),那麼檢測這個最簡單的方法是什麼?
用戶應該允許你這樣做。您應該使用Google API,這裏是: http://code.google.com/apis/accounts/
檢查API,註冊API密鑰,用戶應該讓您檢查他們在Google中的狀態。
請看這裏:http: //www.tomanthony.co.uk/blog/detect-visitor-social-networks/#code全部在一個代碼中檢查用戶在Facebook,Google,Twitter等中的狀態 –
您看過Google開發人員指南了嗎? https://developers.google.com/google-apps/calendar/auth推薦OAuth 2.0。
類似/相同的問題很快搜索 http://stackoverflow.com/questions/10459720/how-to-check-whether-a-user-is-logged-into-his-google-account-通過api – jhanifen
你可以檢查這個[答案](http://stackoverflow.com/questions/4202785/detect-if-a-web-user-is-currently-logged-in-google) – Jeff