Skip to contents

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,
  twitter = FALSE,
  tumblr = FALSE,
  pinterest = FALSE,
  whatsapp = FALSE,
  reddit = FALSE,
  blogger = FALSE,
  weibo = FALSE,
  tiktok = FALSE,
  vk = FALSE,
  telegram = FALSE,
  visit.us = FALSE
)

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

twitter

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

Value

Share link button via social media platforms

Examples for r2social

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

Examples


shareButton(link = "http://rpkg.net", position = "left")
#> <div class="r2social-link-container r2social-social-left">
#>   <a href="https://www.facebook.com/sharer/sharer.php?u=http://rpkg.net" target="_r2socialxlink">
#>     <div class="social-btn-left" style="background-color:#1877f2">
#>       <div class="r2social-icons-left r2s-ico-facebook"></div>
#>       <p class="order-1 google-font margin-telgram" style="color:black">facebook</p>
#>     </div>
#>   </a>
#>   <a href="https://www.linkedin.com/shareArticle?mini=true&amp;url=http://rpkg.net" target="_r2socialxlink">
#>     <div class="social-btn-left" style="background-color:#0A66C2">
#>       <div class="r2social-icons-left r2s-ico-linkedin"></div>
#>       <p class="order-1 google-font margin-telgram" style="color:black">linkedin</p>
#>     </div>
#>   </a>
#> </div>
shareButton(link = "http://obianom.com", position = "right")
#> <div class="r2social-link-container r2social-social-right">
#>   <a href="https://www.facebook.com/sharer/sharer.php?u=http://obianom.com" target="_r2socialxlink">
#>     <div class="social-btn-right" style="background-color:#1877f2">
#>       <div class="r2social-icons-right r2s-ico-facebook"></div>
#>       <p class="order-1 google-font margin-telgram" style="color:black">facebook</p>
#>     </div>
#>   </a>
#>   <a href="https://www.linkedin.com/shareArticle?mini=true&amp;url=http://obianom.com" target="_r2socialxlink">
#>     <div class="social-btn-right" style="background-color:#0A66C2">
#>       <div class="r2social-icons-right r2s-ico-linkedin"></div>
#>       <p class="order-1 google-font margin-telgram" style="color:black">linkedin</p>
#>     </div>
#>   </a>
#> </div>
shareButton(link = "https://shinyappstore.com/", plain = T, position = "inline") #plain styling
#> <div class="r2social-link-container r2social-social-inline">
#>   <a href="https://www.facebook.com/sharer/sharer.php?u=https://shinyappstore.com/" target="_r2socialxlink">
#>     <div class="social-btn-inline" style="background-color:">
#>       <div class="r2social-icons-inline r2s-ico-facebook"></div>
#>       <p class="order-1 google-font margin-telgram" style="color:black">facebook</p>
#>     </div>
#>   </a>
#>   <a href="https://www.linkedin.com/shareArticle?mini=true&amp;url=https://shinyappstore.com/" target="_r2socialxlink">
#>     <div class="social-btn-inline" style="background-color:">
#>       <div class="r2social-icons-inline r2s-ico-linkedin"></div>
#>       <p class="order-1 google-font margin-telgram" style="color:black">linkedin</p>
#>     </div>
#>   </a>
#> </div>
shareButton(link = "https://shinyappstore.com/", plain = F, position = "inline") #beautified
#> <div class="r2social-link-container r2social-social-inline">
#>   <a href="https://www.facebook.com/sharer/sharer.php?u=https://shinyappstore.com/" target="_r2socialxlink">
#>     <div class="social-btn-inline" style="background-color:#1877f2">
#>       <div class="r2social-icons-inline r2s-ico-facebook"></div>
#>       <p class="order-1 google-font margin-telgram" style="color:black">facebook</p>
#>     </div>
#>   </a>
#>   <a href="https://www.linkedin.com/shareArticle?mini=true&amp;url=https://shinyappstore.com/" target="_r2socialxlink">
#>     <div class="social-btn-inline" style="background-color:#0A66C2">
#>       <div class="r2social-icons-inline r2s-ico-linkedin"></div>
#>       <p class="order-1 google-font margin-telgram" style="color:black">linkedin</p>
#>     </div>
#>   </a>
#> </div>