03-18-2018 00:07
03-18-2018 00:07
Hello all,
does anybody know/have a complete code example which demonstrates how to send data (from an exercise, run) from the Ionic to a users profile?
I still couldn't understand how this works, although I studied the guides... 😕
Thanks
Capitano
Best Answer03-19-2018 22:52
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
03-19-2018 22:52
I haven't seen a complete example of this, but we have the SDK OAuth example which demonstrates how to setup the Web API connection and make a query against it, then there are the Web API docs for logging activities.
Best Answer03-21-2018 13:15
03-21-2018 13:15
Is this OAuth example running on the simulator?
I get the error message
But I don't know if I did something wrong or whether the example doesn't run on the simulator.
I copied all the source correctly from github to the Fitbit studio project.
Regards
04-06-2018 07:25
04-06-2018 07:25
This example works great in the simulator but on the iPhone (6+) when I set my Fitbit login information and allow permissions, it redirects correctly but Safari says "Cancel or Open in Fitbit". Cancel gives a white screen and Open in Fitbit opens the Fitbit mobile application to the same Application Settings screen. Neither option (Cancel or Open in Fitbit) actually logs me in and I am unable to use this example outside of the simulator.
This makes me hesitant to continue as I am not sure that this function will work in anything that I create.
Best Answer04-06-2018 07:50
04-06-2018 07:50
@danfare wrote:This example works great in the simulator but on the iPhone (6+) when I set my Fitbit login information and allow permissions, it redirects correctly but Safari says "Cancel or Open in Fitbit". Cancel gives a white screen and Open in Fitbit opens the Fitbit mobile application to the same Application Settings screen. Neither option (Cancel or Open in Fitbit) actually logs me in and I am unable to use this example outside of the simulator.
This makes me hesitant to continue as I am not sure that this function will work in anything that I create.
This is the error message I am getting in Fitbit Studio after tapping 'Cancel' or 'Open in Fitbit' on the iPhone
[10:46:08 AM]Unhandled promise rejection {
column = 1854;
line = 5;
sourceURL = "https://app-settings.fitbitdevelopercontent.com/static/js/companion-settings.d49a76f6.js";
}That line/column appears to be where the OAuth URL is being built.
I have my settings/index.jsx setup using the client ID and client secret provided when I registered my application. The file, otherwise is identical to https://github.com/Fitbit/sdk-oauth/blob/master/settings/index.jsx
Best Answer