-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A super-simple sample? #182
Comments
Hi Moskus, Sorry you've been experiencing issues with compiling the source. Can you let us know what the issue is when you try? I have rebased the latest "portable-async" branch into my fork and it builds ok for me. Have you made sure you have restored the correct nuget packages? I put together a very super simple example of the the new library in a console application and you can run it below ...
This will fire up, spin up a browser window where you can authenticate, then you will be redirected back to the url (which won't resolve anywhere as we're in a console app) however it will look something like this ...
... and you take the code (minus #_=#) and paste it into the console application. Note: make sure the callback url is exactly the same as the one configured in the Fitbit application settings in the dev area as they are (or at least were) case sensitive. This application is currently running with the following nuget packages configuration ...
Hope this helps! |
Ah, excellent example. Perfect!! And thanks for what you are doing with the project! On Sat, Jul 30, 2016 at 11:07 AM, Adam Storr [email protected]
Antonio Olander |
@WestDiscGolf , thank you so much for this sample! It's seems to be EXACTLY what I need! I'll try it tonight! :) I'll grab all the errors from the latest "portable-async" branch so you can have a look. :) |
I just did a quick test. Some of the packages are newer (e.g. RC3 apparently happened), and I had to use .NET Framework 4.6.1, but now it compiles. :) I've tried to register a new app with "http://localhost" as the callback URI just to check, but still nothing. EDIT: Okay, I learned that the callback URI needs to be exactly what's entered in the Fitbit app. That's going to be a problem when I don't know what it is! The users use their own web server (HomeSeer provides it), and I don't know the URIs... :( Any pointers? ... and can I just store the token? |
How can I refresh a token? I'm trying |
so what is the offical source for this project? Having a really tough time getting any forked to pull down and compile. |
The default branch, async-portable, is the main branch. |
Thanks, It's when I'm opening the the Fitbit-WithSamples.sln that I'm having some issues. 1. The Fitbit.Common project says, 'unavailable' (I can remove it). But then the SampleWebMVC.Portable project cannot seem to restore any of the nuget packages. |
I've not personally tried all the slns and I don't think they've all been kept up to date. If you open the Fitbit.sln it will have the library project and the tests project. Common doesn't exist anymore which is why I believe the slns haven't been kept up to date |
I just saw this issue -- I submitted a PR with a very similar console app: #218 In addition, it automates the retrieval of the code form the redirect url. |
Hi, is there any way to make entering of the pin automatic? Can we somehow bypass that manual entry? |
@pedjaaaa yes -- I am doing that here: The basic idea is that you are going to redirect from the fitbit authorization to http://localhost: and there will be an HttpListener listening at http://localhost: and that will retrieve the code automatically. The only downside is that it will require that the app run as admin otherwise you can't listen using the HttpListener -- however, this is only required the first time you authorize the app (and the sample I linked to will automatically re-launch itself as admin when needed). |
Hi @AlexGhiondea, Thanks for your help :) |
I have a hard time wrapping my head around the samples in the new version. I have a hard time just compiling them in my instance of VS 2015, there are references missing and I don't have SQL server 2012 either (and I don't plan to use it). The old console application sample was excellent, and was exactly what I was looking for, I'm writing a plugin for home automation software HomeSeer, and the plugins are essentially console applications with a web front end.
Is it possible for somebody to create a (extremely) simple asp.net project? Just a page or two demonstrating how to authenticate using OAuth2.0, and just write some data (Response.Write() is fine!).
The text was updated successfully, but these errors were encountered: