whazzmaster / fitgem-client

Example client use of the fitgem oauth library to integrate with fitbit.com
MIT License
35 stars 9 forks source link

curl getting empty pages #10

Closed winkler1 closed 9 years ago

winkler1 commented 10 years ago

So I'm following the instructions on http://fitbitclient.com/guide/playing-with-the-fitgem-api. Great approach BTW.

Problem is, the curl doesn't get anything - no error, either. $ curl https://gist.github.com/whazzmaster/5322902/raw/4439e2d577567d280856a2d77cef7b824a851cd1/test-fitgem.rb ~/fitgem-sandbox

whazzmaster commented 10 years ago

Thanks for the heads-up- I received a few emails from folks that the client app (as well as this test script) are breaking in certain ways that suggest I need to update the OAuth support. From the problems I'm seeing it looks as if Fitbit has changed the way you auth to use the API.

Unfortunately, between work and family I may not have time to look into this for a few weeks. I'm happy to review and accept any pull requests anyone might have to address the problems, otherwise I will jump on it as soon as son's baptism, mother's day, and a work trip are done :(

meal commented 10 years ago

Fix is easy - just replace "gist.github.com" part with "gist.githubusercontent.com" since gist.github.com does 301 redirect to the gist.githubusercontent.com

whazzmaster commented 10 years ago

Oh, nice, I'll update- thanks!

cbowns commented 9 years ago

Adding -L to the curl command will make it follow 301s.