oauthlib: build and validate OAuth headers, following Ruby's https://github.com/laserlemon/simple_oauth
BEWARE: VERY ALPHA - & NOT FUNCTIONAL YET
remotes::install_github("sckott/oauthlib")
library("oauthlib")
(x <- OAuth$new("get", "https://api.twitter.com/1/statuses/friends.json", list()))
#> <oauth>
#> method: GET
#> url: https://api.twitter.com/1/statuses/friends.json
x
#> <oauth>
#> method: GET
#> url: https://api.twitter.com/1/statuses/friends.json
x$url()
#> [1] "https://api.twitter.com/1/statuses/friends.json"
x$as_string()
#> [1] "OAuth oauth_nonce=\"7b05716aedd2421bdc733517e527f9c4\", oauth_signature_method=\"HMAC-SHA1\", oauth_timestamp=\"1551903013.2116\", oauth_version=\"1.0\", oauth_signature=\"ZGQ4ZGE1MTE3MDg2NTg2YWQ1YWIwOGU4YTA2OTNlOTI1YTRmZWZiNg==\""
x$signed_attributes()
#> $oauth_nonce
#> [1] "7b05716aedd2421bdc733517e527f9c4"
#>
#> $oauth_signature_method
#> [1] "HMAC-SHA1"
#>
#> $oauth_timestamp
#> [1] 1551903013
#>
#> $oauth_version
#> [1] "1.0"
#>
#> $oauth_signature
#> [1] "ZGQ4ZGE1MTE3MDg2NTg2YWQ1YWIwOGU4YTA2OTNlOTI1YTRmZWZiNg=="
oauthlib
in R doing citation(package = 'oauthlib')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.