Skip to content

alexthered/fitbitAPI20-scribe-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fitbitAPI20-scribe-java

Note: this work now is included in scribe-java's api library

Fitbit's OAuth2.0 basing on scribe-java library

Maven Central

Summary

This is my FitbitAPI20 client's implmentation basing on scribe-java library. To be able to use Fitbit's API 2.0, it's not very difficult, but at many points, they use some details which is not OAuth2.0 standard, thus, you might need to override the default implementation given in scribe-java library.

How to use

It's very to use. Just include two files FitbitApi20.java and Fitbit20ServiceImpl in your projects. Then you can easily setup the Fitbit client like this:

final OAuth20Service service = new ServiceBuilder(clientId)
                .apiSecret(clientSecret)
                .scope("activity profile") // replace with desired scope
                .callback("http://example.com")  //your callback URL to store and handle the authorization code sent by Fitbit
                .build(FitbitApi20.instance());

Of course, you need to include scribe-java as a library. It's very easy if you use Maven:

 <dependency>
          <groupId>com.github.scribejava</groupId>
          <artifactId>scribejava-core</artifactId>
          <version>5.3.0</version>
  </dependency>

Questions

Feel free to drop me an email or create an issue right here. Thanks.

About

Fitbit's OAuth2.0 basing on scribe-java library

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages