开发者

How to find all active sessions of gmail and facebook accounts?

开发者 https://www.devze.com 2023-04-09 14:01 出处:网络
After some research I found outa way to check all the active sessions of gmail and face book manually. Is there are APIs to get details of these accounts an开发者_Python百科 sign them out?I don\'t kno

After some research I found out a way to check all the active sessions of gmail and face book manually. Is there are APIs to get details of these accounts an开发者_Python百科 sign them out?


I don't know of any APIs, but that doesn't mean you couldn't get the same functionality by screen-scraping the sites. Without an API, however, your code is subject to potential breakage whenever Facebook or Google update their web apps.

Facebook

For facebook, you could screen-scrape the URL https://www.facebook.com/settings?tab=security&section=sessions&t. Also investigate the URL https://www.facebook.com/ajax/settings/security/sessions/stop.php?__a=1, which is the URL accessed in the background when you click the "End Activity" link.

GMail

Google's seems to be a little more complex, but if you screen-scrape https://mail.google.com/mail/h/ (the plain-html interface), find and follow the "Details" link at the bottom, you may be able to automatically log sessions out that way too.


For Google I found another article that made this easy. google account logout and redirect As for Facebook they have the fb API you can get in JavaScript and php. These will allow you to control the currently logged in user account. There are log-out functions for the user as well. However digging around in the account is difficult to do because your domain can't see the data for that user without being authorized by both Facebook and the user. Dig around here if you want to deal with facebook data and access. https://developers.facebook.com/ Open graph is fairly easy to use.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号