Not sure what is going wrong here, been playing with it for a couple of days now. This is the closest I've gotten to a working bit of code.
clientSecret <- "blahblahblah"
clientId <- "3979" # thats me
myapp <- oauth_app("strava", clientId, clientSecret)
endpoint <- oauth_endpoint(request, authorize, access)
z <- (oauth2.0_token(endpoint, myapp, scope="view_private"))
The result is "z"
> z
<Token>
<oauth_endpoint>
<oauth_app> strava
key: 3979
secret: <hidden>
<credentials>
---
> z$credentials # returns about 15,000 lines of this, which when parsed to characters is just the html of the main strava login page...
[1] 3c 21 44 4f 43 54 59 50 45 20 68 74 6d 6c 3e 0a 3c 68 74 6d 6c 20 63 6c 61 73 73 3d
[29] 27 6c 6f 67 67 65 64 2d 6f 75 74 20 66 75 6c 6c 73 63 72 65 65 6e 20 72 65 73 70 6f
[57] 6e 73 69
> c <-rawToChar(z$credentials, multiple = FALSE)
> c
[1] "<!DOCTYPE html>\n<html class='logged-out fullscreen responsive cycling-background-1 old-login' lang='en-US' xmlns:fb='
http://www.facebook.com/2008/fbml' xmlns:og='
http://opengraphprotocol.org/schema/' xmlns='
http://www.w3.org/TR/html5'>\n<head>\n<meta charset='UTF-8'>\n<meta content='i-49ea2da4' name='instance_id'>\n<meta content='yes' name='apple-mobile-web-app-capable'>\n<meta content='black' name='apple-mobile-web-app-status-bar-style'>\n<meta content='width = device-width, initial........
Has anyone connected to strava with R before? Got any advice? Thanks, I appreciate it!