我想连接到我用httr包创建的Pinterest应用程序。因此我使用oauth2.0_token()
函数。
问题是:它将浏览器重定向到http://localhost:1410
但Pinterest只允许 https 重定向URI。
那么如何让httr使用https作为重定向URI?
到目前为止我的代码:
pinterest <- oauth_endpoint(
authorize = "https://api.pinterest.com/oauth",
access = "https://api.pinterest.com/v1/oauth/token")
myapp <- oauth_app(app_name, client_id, NULL)
#scope <- NULL
pi_oauth <- oauth2.0_token(pinterest, myapp,scope=scope,type = "application/x-www-form-urlencoded",cache=FALSE)