Learn R Programming

r2social (version 1.1)

shareButton: Add social buttons to share a page

Description

Customize social buttons available for sharing of pages

Usage

shareButton(
  link,
  image = NULL,
  text = NULL,
  position = c("left", "right", "inline"),
  text.color = "black",
  plain = FALSE,
  facebook = TRUE,
  linkedin = TRUE,
  x = FALSE,
  tumblr = FALSE,
  pinterest = FALSE,
  whatsapp = FALSE,
  reddit = FALSE,
  blogger = FALSE,
  weibo = FALSE,
  tiktok = FALSE,
  vk = FALSE,
  telegram = FALSE,
  visit.us = FALSE
)

Value

Share link button via social media platforms

Arguments

link

the link to share on social media

image

the image link to share on social media

text

the text to share on social media

position

of buttons e.g "left","right","bottom","inline"

text.color

text color e.g black

plain

logical. with or without background

facebook

share on Facebook

linkedin

share on Linkedin

x

share on Twitter

tumblr

share on Tumblr

pinterest

share on Pinterest

whatsapp

share on Whatsapp

reddit

share on Reddit

blogger

share on Blogger

weibo

share on Weibo

tiktok

share on Tiktok

vk

share on VK or VKontakte

telegram

share on Telegram

visit.us

share on custom link

Examples for r2social

More examples and demo pages are located at this link - https://r2social.obi.obianom.com.

Examples

Run this code

shareButton(link = "http://rpkg.net", position = "left")
shareButton(link = "http://obianom.com", position = "right")
shareButton(link = "https://shinyappstore.com/", plain = TRUE, position = "inline") #plain styling
shareButton(link = "https://shinyappstore.com/", plain = FALSE, position = "inline") #beautified

Run the code above in your browser using DataLab