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

error compilation Fitbit4J

ANSWERED

Hi !

I develop for my internship an application that uses the library fitbit4J to get my  activities data Fitbit.

 

I was able to recover the Client ( Consumer) Key / Client ( Consumer) Secret, the access token and PIN . I used the following tutorial : http://blog.kopis.de/minimum-working-example-for-fitbit4j/

Which is an application JavaSE

 

I imported the following jars :

 

jars.png

 

1/I got this error:

 

Exception in thread "main" java.lang.NoClassDefFoundError: org/json/JSONException

       at fitbitJ3.Main.main(Main.java:36)

Caused by: java.lang.ClassNotFoundException: org.json.JSONException

       at java.net.URLClassLoader.findClass(Unknown Source)

       at java.lang.ClassLoader.loadClass(Unknown Source)

       at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

       at java.lang.ClassLoader.loadClass(Unknown Source)

       ... 1 more

 

2/I did not understand the usefulness of the ruby file fitbit_console_application.rb and how I fit into the Java project.

 

can you help me please?

 

thanks

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

In that case, setting up any OAuth 1.0 compliant client library should allow you to do that.

The link to the documentation I posted has distance, steps, calories, etc. You can find other API endpoints at https://wiki.fitbit.com/display/API/Fitbit+Resource+Access+API

View best answer in original post

Best Answer
0 Votes
6 REPLIES 6

Hi,

 

The Fitbit4J library is deprecated and it is recommended that you a popular OAuth 1.0 library thats available in the language of your choice.

Best Answer
0 Votes
Thank you for your answer, I am beginner in developpement Fitbit API, i think that Oauth1.0 is used for authentication, so how can i recover activities data?
thank you
Best Answer
0 Votes

@samFit2015 wrote:
Thank you for your answer, I am beginner in developpement Fitbit API, i think that Oauth1.0 is used for authentication, so how can i recover activities data?
thank you

What do you mean by recover?

 

Documentation about our Activities APIs is available on the wiki:

https://wiki.fitbit.com/display/API/API-Get-Activities

Best Answer
0 Votes
I mean having to enter my data (distance, number of steps, calories consomer ) for use in an application.

thanks
Best Answer
0 Votes

In that case, setting up any OAuth 1.0 compliant client library should allow you to do that.

The link to the documentation I posted has distance, steps, calories, etc. You can find other API endpoints at https://wiki.fitbit.com/display/API/Fitbit+Resource+Access+API

Best Answer
0 Votes

Thank you Dan for your help.

Best Answer
0 Votes