## Not run:
# # OAuth2.0-authenticated use
#
# # interactive OAuth login
# tkn <- imgur_login()
#
# # upload a simple graph
# i <- imgur(token = tkn)
# hist(rnorm(100))
# u <- imgur_off(i)
#
# # pass the `imgur_image` object to `update_image`:
# update_image(u, title = 'My graph', description = 'A simple graph', token = tkn)
#
# # or, pass just the image id:
# update_image(u$id, title = 'My graph', description = 'A simple graph', token = tkn)
#
# # periodically refresh token
# tkn$refresh()
# ## End(Not run)
## Not run:
# # anonymous use
#
# # upload a simple graph
# i <- imgur()
# hist(rnorm(100))
# u <- imgur_off(i)
#
# # pass just the image deletehash:
# update_image(u$deletehash, title = 'My graph', description = 'A simple graph')
# ## End(Not run)
Run the code above in your browser using DataLab