Last chance! 50% off unlimited learning
Sale ends in
This function allows to delete a post.
post.delete(base_hostname = NA, id = NA, token = NA, consumer_key = NA,
consumer_secret = NA)
The standard or custom blog hostname. See Details.
The ID of the post to delete.
Represents the complete set of data needed for OAuth access: an app, an endpoint, cached credentials and parameters. See Details.
The consumer key provided by your application.
The consumer secret provided by your application.
Returns 200: OK (successfully deleted) or an error code.
Each blog has a unique hostname. The hostname can be standard or custom. Standard hostname: the blog short name + .tumblr.com. Custom hostname: Anything at all, as determined by a DNS CNAME entry.
The API uses three different levels of authentication, depending on the method. None: No authentication. Anybody can query the method. API key: Requires an API key. Use your OAuth Consumer Key as your api_key. OAuth: Requires a signed request that meets the OAuth 1.0a Protocol.
The API supports the OAuth 1.0a Protocol, accepting parameters via the Authorization header, with the HMAC-SHA1 signature method only.
https://www.tumblr.com/docs/en/api/v2
# NOT RUN {
## An example of an authenticated request using the httr package,
## where consumer_key, consumer_secret, appname are fictitious.
## You can obtain your own at https://www.tumblr.com/oauth/apps
consumer_key <-'key'
consumer_secret <- 'secret'
appname <- Tumblr_App
tokenURL <- 'https://www.tumblr.com/oauth/request_token'
accessTokenURL <- 'https://www.tumblr.com/oauth/acces_token'
authorizeURL <- 'https://www.tumblr.com/oauth/authorize'
app <- oauth_app(appname, consumer_key, consumer_secret)
endpoint <- oauth_endpoint(tokenURL, authorizeURL, accessTokenURL)
token <- oauth1.0_token(endpoint, app)
sig <- sign_oauth1.0(app,
token = token$credentials$oauth_token,
token_secret = token$credentials$oauth_token_secret)
## you must specify a real blog for base_hostname
base_hostname <- "blogname.tumblr.com"
id <- 7504154594
post.delete(base_hostname = base_hostname, id = id, token = token,
consumer_key = consumer_key, consumer_secret = consumer_secret)
# }
Run the code above in your browser using DataLab