.rtweet | R Documentation |
wrapper for post_tweet to send tweets with media created using carbonate.
.rtweet(self, private, media, status = self$tweet_status, media_format = c("png", "gif"), ...)
self |
carbon self object |
private |
carbon private object |
media |
magick-image object or path to image |
status |
character, status to attach to post, Default: self$tweet_status |
media_format |
character, type of media to tweet, Default: c('png','gif') |
... |
arguments to pass to post_tweet |
If multiple images are passed they can be either converted to a gif by setting media_format to 'gif' or attached each one to the post.
outcome from rtweet
image_write post_tweet
## Not run: x <- carbonate::carbon$new() x$carbonate(code = readLines(system.file('DESCRIPTION',package='carbonate'))) x$carbonate(code = 'x+2') # using default status value (x$tweet_status) x$rtweet(system.file('figures/hex_black_small.png',package='carbonate')) x$rtweet(status = 'these are two pngs',media = x$carbons,media_format='png') x$rtweet(status = 'this is a gif', media = x$carbons,media_format='gif') ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.