03-18-2018 00:07
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

03-18-2018 00:07
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
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

03-19-2018 22:52
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


03-19-2018 22:52
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
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.

03-21-2018 13:15
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

03-21-2018 13:15
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
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
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

04-06-2018 07:25
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
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.

04-06-2018 07:50
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

04-06-2018 07:50
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
@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

