sorenlouv / fb-sleep-stats

Use Facebook to track your friends’ sleeping habits
https://medium.com/@sqrendk/how-you-can-use-facebook-to-track-your-friends-sleeping-habits-505ace7fffb6
MIT License
1.62k stars 314 forks source link

Include tracking our own data/sleep #73

Closed borndangerous closed 8 years ago

borndangerous commented 8 years ago

As I've been using and loving this more and more, I realize there's one thing missing: my own sleep/wake (active/inactive) patterns. I'm absurdly finding myself jealous of the datasets I now have on everyone I know. :)

Seems it should be trivial, but in my brief digging around, I wonder if it's not a bit of work to do this.

In exploring the Messenger JSON data used to populate all this, (somewhat) obviously the one Facebook User ID (and it's relevant timestamps) not included is my own (eg: the logged-in Facebook user).

Clearly there are other ways to track this sort of thing, but I'd love to figure out where Facebook dumps out the equivalent timestamps for me as it does so nicely for everyone in my graph (via Messenger.com, etc).

In short: is there a simple Graph API call or data object that could be pinged in the scraper that also gets my lastActive timestamps?

Will continue looking into it, but wanted to mention in case anyone has any ideas.

Anubisss commented 8 years ago

You can't do this or maybe you can but it's pointless to do. Because your FB account does the scraping your account is like always active.

If your pollingInterval in the config is 10 minutes then your account becomes active at least every 10 minutes. So you never sleep. :)

borndangerous commented 8 years ago

Props for such an elusively obvious, logical observation. ;) I'll have to think about it from another angle.

sorenlouv commented 8 years ago

@Anubisss is correct. And thanks for answering.

The only workaround I can think of, is to create a new Facebook account, connect it with you regular account, and setup fb-sleep-stats with the new account. This way it will track the activity of you regular account. However, you will not be tracking sleep of anyone else.

Hope this helps. I'll close this issue for now.