PHP Classes

Fitbit Oauth2

Recommend this page to a friend!

      PHP OAuth Library  >  PHP OAuth Library package blog  >  Learn with a PHP OAut...  >  All threads  >  Fitbit Oauth2  >  (Un) Subscribe thread alerts  
Subject:Fitbit Oauth2
Summary:Issue using login_with_fitbit2
Messages:22
Author:Tyler
Date:2016-04-21 17:45:56
 
  1 - 10   11 - 20   21 - 22  

  11. Re: Fitbit Oauth2   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2016-04-24 23:43:37 - In reply to message 10 from Tyler
OK, I just added the variable log_file_name so you can set the debug output to go to a file.

The class also has the debug_output variable to gather the debug output messages when the debug variable is set to true.

  12. Re: Fitbit Oauth2   Reply   Report abuse  
Picture of Tyler Tyler - 2016-04-25 17:17:09 - In reply to message 11 from Manuel Lemos
Thank you so much!

  13. Re: Fitbit Oauth2   Reply   Report abuse  
Picture of Tyler Tyler - 2016-04-26 00:37:33 - In reply to message 12 from Tyler
So I just implemented the new oauth_client and when I now run the login_with_fitbit2.php, it now outputs to the textfile that I set it to. It outputs the following,

OAuth client: Checking if OAuth access token was already retrieved from https://api.fitbit.com/oauth2/token
OAuth client: The OAuth access token eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE0NjE2MzQyMjUsInNjb3BlcyI6IndzbGUgd2hyIHdhY3QiLCJzdWIiOiIzNzdCSlkiLCJhdWQiOiIyMjdONzgiLCJpc3MiOiJGaXRiaXQiLCJ0eXAiOiJhY2Nlc3NfdG9rZW4iLCJpYXQiOjE0NjE2MzA2MjV9.HEFNgDuyVQGbxf9Za32u0eoUJOQBMAvfkNdaX2GPXc4 is valid
OAuth client: The OAuth access token expires on 2016-04-26 01:30:25
OAuth client: The OAuth access token is of type Bearer
OAuth client: Accessing the API call at https://api.fitbit.com/1/user/-/activities/date/2016-04-25.json
OAuth client: Accessing the API call at https://api.fitbit.com/1/user/-/sleep/date/2016-04-25.json
OAuth client: Accessing the API call at https://api.fitbit.com/1/user/-/heart/date/2016-04-25.json

Is there a reason why my fitbit data is not being printed as well? It accesses the API call, but it doesn't print anything like it does in the PHP error log. The addition to oauth_client works well, but I had thought it would also output my data that I requested from Fitbit. Hope you can help clarify. Thanks Tyler

  14. Re: Fitbit Oauth2   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2016-04-26 03:40:19 - In reply to message 13 from Tyler
Ah, the HTTP class debug output is not being forwarded there.

I need to figure how to pass that setting to the HTTP class.

  15. Re: Fitbit Oauth2   Reply   Report abuse  
Picture of Tyler Tyler - 2016-04-29 14:20:37 - In reply to message 14 from Manuel Lemos
Just wondering if you managed to figure out how to pass the setting to the HTTP class? Thanks, Tyler

  16. Re: Fitbit Oauth2   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2016-04-29 19:33:07 - In reply to message 15 from Tyler
Yes, but did not implement it yet. Let me update the HTTP class in a moment.

  17. Re: Fitbit Oauth2   Reply   Report abuse  
Picture of Tyler Tyler - 2016-04-30 16:21:36 - In reply to message 16 from Manuel Lemos
That's great! I just checked to find the updated HTTP.php, but it looks like it hasn't been updated yet. Just wanted to let you know in case the file didn't upload correctly.

  18. Re: Fitbit Oauth2   Reply   Report abuse  
Picture of Tyler Tyler - 2016-05-02 13:59:20 - In reply to message 17 from Tyler
Hi Manuel, just wondering if you had received my last message? I am hoping to have everything completed before my presentation on Wednesday, but I need your updated HTTP.PHP to export my fitbit data to a text file. You had said you would update it, but it looks like it hasn't been if I am looking in the right area. Thanks again for everything, Tyler

  19. Re: Fitbit Oauth2   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2016-05-03 02:11:02 - In reply to message 18 from Tyler
Sorry for the delay. I have been a bit ill but now I updated both packages to use the same file specified by the log_file_name variable.

  20. Re: Fitbit Oauth2   Reply   Report abuse  
Picture of Tyler Tyler - 2016-05-03 03:34:02 - In reply to message 19 from Manuel Lemos
I'm so sorry to rush you especially when you weren't feeling well. Everything works beyond amazing and I'm now outputting the data to a text file. Thank you for taking time out of your busy schedule to help me and for all your work on this site. I hope you feel better and thank you again for everything! Tyler

 
  1 - 10   11 - 20   21 - 22