Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Extract my personal (publicly available) steps, without Oauth

Ive got a personal website hosted with a free hosting provider, which dont allow installing addons or plugins, and oAuth is not installed

 

I want to include an up to date link to my data with the Fitbit API using PHP.

 

There are a number of php librarys created to emulate the oAuth plugin, but they havent been updated in around 2 years.

 

I have a workaround that uses Google Drive, but it takes up to 15 minutes to update the current total

(http://p337.x10host.com/18 - Ive documented how to do it on my blog!)

I really want a way to display my public data on my website, can anyone reccomend any places to start, that dont involve me developing my own OAuth PHP library?

 

I additionally want to write up how other people can use it too!

 

Thanks

Best Answer
0 Votes
1 REPLY 1

@P337 wrote:

There are a number of php librarys created to emulate the oAuth plugin, but they havent been updated in around 2 years.


OAuth 1.0a protocol hasn't changed since June 2009, so that's not necessarily a bad thing. Try them out. A commonly used PHP OAuth 1.0a library is this one: https://code.google.com/p/oauth-php/wiki/ConsumerHowTo

 


P337 wrote:

I have a workaround that uses Google Drive, but it takes up to 15 minutes to update the current total


Fitbit trackers attempt to sync every 15–20 minutes. Not sure if this is a delay with Google Docs or how the tracker was designed.

 


@P337 wrote:

Ive got a personal website hosted with a free hosting provider, which dont allow installing addons or plugins, and oAuth is not installed

 ...

I want to include an up to date link to my data with the Fitbit API using PHP.

 ...
I really want a way to display my public data on my website


I think this is a great idea. Be mindful of the API rate limit (150 requests per hour). Try to cache the API response so that every page load does not cause a new API request. You should consider using the Subscriptions API so that your website gets pinged by Fitbit when you sync and then your website knows to invalidate its cache and request your latest data.

Best Answer