fork download
  1. #!/usr/bin/perl
  2. # your code goes here
  3.  
  4. # From: Social Share Media
  5. # BSD 3 Clause License
  6. # Check us out : https://g...content-available-to-author-only...b.com/bradvin/social-share-urls
  7.  
  8. package SocialShareMedia::SocialShareURLs;
  9. use strict;
  10.  
  11. sub GetSocialMediaSites_NiceNames {
  12. 'add.this'=>'AddThis',
  13. 'blogger'=>'Blogger',
  14. 'buffer'=>'Buffer',
  15. 'diaspora'=>'Diaspora',
  16. 'digg'=>'Digg',
  17. 'douban'=>'Douban',
  18. 'email'=>'EMail',
  19. 'evernote'=>'EverNote',
  20. 'getpocket'=>'Pocket',
  21. 'facebook'=>'FaceBook',
  22. 'flattr'=>'Flattr',
  23. 'flipboard'=>'FlipBoard',
  24. 'google.bookmarks'=>'GoogleBookmarks',
  25. 'instapaper'=>'InstaPaper',
  26. 'line.me'=>'Line.me',
  27. 'linkedin'=>'LinkedIn',
  28. 'livejournal'=>'LiveJournal',
  29. 'gmail'=>'GMail',
  30. 'hacker.news'=>'HackerNews',
  31. 'ok.ru'=>'OK.ru',
  32. 'pinterest.com'=>'Pinterest',
  33. 'google.plus'=>'GooglePlus',
  34. 'qzone'=>'QZone',
  35. 'reddit'=>'Reddit',
  36. 'renren'=>'RenRen',
  37. 'skype'=>'Skype',
  38. 'sms'=>'SMS',
  39. 'stumbleupon'=>'StumbleUpon',
  40. 'surfingbird.ru'=>'SurfingBird.ru',
  41. 'telegram.me'=>'Telegram.me',
  42. 'threema'=>'Threema',
  43. 'tumblr'=>'Tumblr',
  44. 'twitter'=>'Twitter',
  45. 'vk'=>'VK',
  46. 'weibo'=>'Weibo',
  47. 'xing'=>'Xing',
  48. 'yahoo'=>'Yahoo',
  49. ];
  50. }
  51.  
  52.  
  53. sub GetSocialMediaSites_WithShareLinks_OrderedByPopularity {
  54. 'google.plus',
  55. 'google.bookmarks',
  56. 'facebook',
  57. 'reddit',
  58. 'twitter',
  59. 'linkedin',
  60. 'tumblr',
  61. 'pinterest',
  62. 'blogger',
  63. 'livejournal',
  64. 'evernote',
  65. 'add.this',
  66. 'getpocket',
  67. 'hacker.news',
  68. 'stumbleupon',
  69. 'digg',
  70. 'buffer',
  71. 'flipboard',
  72. 'instapaper',
  73. 'surfingbird.ru',
  74. 'flattr',
  75. 'diaspora',
  76. 'qzone',
  77. 'vk',
  78. 'weibo',
  79. 'ok.ru',
  80. 'douban',
  81. 'xing',
  82. 'renren',
  83. 'threema',
  84. 'sms',
  85. 'line.me',
  86. 'skype',
  87. 'telegram.me',
  88. 'email',
  89. 'gmail',
  90. 'yahoo',
  91. ];
  92. }
  93.  
  94. sub GetSocialMediaSites_WithShareLinks_OrderedByAlphabet {
  95. my ($args) = @_;
  96.  
  97. my $nice_names = GetSocialMediaSites_NiceNames();
  98.  
  99. return keys %$nice_names;
  100. }
  101.  
  102. # Social Media Site Links With Share Links
  103. # -------------------------------------------------
  104.  
  105. sub encode {
  106. my ($args) = @_;
  107.  
  108. return $args;
  109. }
  110.  
  111. sub GetSocialMediaSiteLinks_WithShareLinks {
  112. my ($args) = @_;
  113.  
  114. my $url = encode($args->{url});
  115. my $title = encode($args->{title});
  116. my $image = encode($args->{image});
  117. my $desc = encode($args->{desc});
  118. my $app_id = encode($args->{appid});
  119. my $redirect_url = encode($args->{redirecturl});
  120. my $via = encode($args->{via});
  121. my $hash_tags = encode($args->{hashtags});
  122. my $provider = encode($args->{provider});
  123. my $language = encode($args->{language});
  124. my $user_id = encode($args->{userid});
  125. my $category = encode($args->{category});
  126. my $phone_number = encode($args->{phonenumber});
  127. my $email_address = encode($args->{emailaddress});
  128. my $cc_email_address = encode($args->{ccemailaddress});
  129. my $bcc_email_address = encode($args->{bccemailaddress});
  130.  
  131. my $text = $title;
  132.  
  133. if($desc) {
  134. $text .= '%20%3A%20'; # This is just this, " : "
  135. $text .= $desc;
  136. }
  137.  
  138. 'add.this'=>'http://w...content-available-to-author-only...s.com/bookmark.php?url=' . $url,
  139. 'blogger'=>'https://w...content-available-to-author-only...r.com/blog-this.g?u=' . $url . '&n=' . $title . '&t=' . $desc,
  140. 'buffer'=>'https://b...content-available-to-author-only...r.com/add?text=' . $text . '&url=' . $url,
  141. 'diaspora'=>'https://s...content-available-to-author-only...n.org/?title=' . $title . '&url=' . $url,
  142. 'digg'=>'http://d...content-available-to-author-only...g.com/submit?url=' . $url . '&title=' . $text,
  143. 'douban'=>'http://w...content-available-to-author-only...n.com/recommend/?url=' . $url . '&title=' . $text,
  144. 'email'=>'mailto:' . $email_address . '?subject=' . $title . '&body=' . $desc,
  145. 'evernote'=>'http://w...content-available-to-author-only...e.com/clip.action?url=' . $url . '&title=' . $text,
  146. 'getpocket'=>'https://g...content-available-to-author-only...t.com/edit?url=' . $url,
  147. 'facebook'=>'http://w...content-available-to-author-only...k.com/sharer.php?u=' . $url,
  148. 'flattr'=>'https://f...content-available-to-author-only...r.com/submit/auto?user_id=' . $user_id . '&url=' . $url . '&title=' . $title . '&description=' . $text . '&language=' . $language . '&tags=' . $hash_tags . '&hidden=HIDDEN&category=' . $category,
  149. 'flipboard'=>'https://s...content-available-to-author-only...d.com/bookmarklet/popout?v=2&title=' . $text . '&url=' . $url,
  150. 'gmail'=>'https://mail.google.com/mail/?view=cm&to=' . $email_address . '&su=' . $title . '&body=' . $url . '&bcc=' . $bcc_email_address . '&cc=' . $cc_email_address,
  151. 'google.bookmarks'=>'https://www.google.com/bookmarks/mark?op=edit&bkmk=' . $url . '&title=' . $title . '&annotation=' . $text . '&labels=' . $hash_tags . '',
  152. 'instapaper'=>'http://w...content-available-to-author-only...r.com/edit?url=' . $url . '&title=' . $title . '&description=' . $desc,
  153. 'line.me'=>'https://l...content-available-to-author-only...e.me/share/ui?url=' . $url . '&text=' . $text,
  154. 'linkedin'=>'https://w...content-available-to-author-only...n.com/shareArticle?mini=true&url=' . $url . '&title=' . $title . '&summary=' . $text . '&source=' . $provider,
  155. 'livejournal'=>'http://w...content-available-to-author-only...l.com/update.bml?subject=' . $text . '&event=' . $url,
  156. 'hacker.news'=>'https://n...content-available-to-author-only...r.com/submitlink?u=' . $url . '&t=' . $title,
  157. 'ok.ru'=>'https://c...content-available-to-author-only...k.ru/dk?st.cmd=WidgetSharePreview&st.shareUrl=' . $url,
  158. 'pinterest'=>'http://p...content-available-to-author-only...t.com/pin/create/button/?url=' . $url ,
  159. 'google.plus'=>'https://plus.google.com/share?url=' . $url . '&text=' . $text . '&hl=' . $language,
  160. 'qzone'=>'http://s...content-available-to-author-only...q.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=' . $url,
  161. 'reddit'=>'https://r...content-available-to-author-only...t.com/submit?url=' . $url . '&title=' . $title,
  162. 'renren'=>'http://w...content-available-to-author-only...n.com/dialog/share?resourceUrl=' . $url . '&srcUrl=' . $url . '&title=' . $text . '&description=' . $desc,
  163. 'skype'=>'https://w...content-available-to-author-only...e.com/share?url=' . $url . '&text=' . $text,
  164. 'sms'=>'sms:' . $phone_number . '?body=' . $text,
  165. 'stumbleupon'=>'http://w...content-available-to-author-only...n.com/submit?url=' . $url . '&title=' . $text,
  166. 'surfingbird.ru'=>'http://s...content-available-to-author-only...d.ru/share?url=' . $url . '&description=' . $desc . '&screenshot=' . $image . '&title=' . $title,
  167. 'telegram.me'=>'https://content-available-to-author-only.me/share/url?url=' . $url . '&text=' . $text . '&to=' . $phone_number,
  168. 'threema'=>'threema://compose?text=' . $text . '&id=' . $user_id,
  169. 'tumblr'=>'https://w...content-available-to-author-only...r.com/widgets/share/tool?canonicalUrl=' . $url . '&title=' . $title . '&caption=' . $desc . '&tags=' . $hash_tags,
  170. 'twitter'=>'https://t...content-available-to-author-only...r.com/intent/tweet?url=' . $url . '&text=' . $text . '&via=' . $via . '&hashtags=' . $hash_tags,
  171. 'vk'=>'http://content-available-to-author-only.com/share.php?url=' . $url . '&title=' . $title . '&comment=' . $desc,
  172. 'weibo'=>'http://s...content-available-to-author-only...o.com/share/share.php?url=' . $url . '&appkey=&title=' . $title . '&pic=&ralateUid=',
  173. 'xing'=>'https://w...content-available-to-author-only...g.com/app/user?op=share&url=' . $url,
  174. 'yahoo'=>'http://c...content-available-to-author-only...o.com/?to=' . $email_address . '&subject=' . $title . '&body=' . $text,
  175. };
  176. }
  177.  
  178. my @social_media_names = @{GetSocialMediaSites_WithShareLinks_OrderedByPopularity() || []};
  179. my $social_media_urls = GetSocialMediaSiteLinks_WithShareLinks({
  180. url=>'https://w...content-available-to-author-only...t.com/',
  181. title=>'EarthFluent',
  182. });
  183.  
  184. foreach my $social_media_name(@social_media_names) {
  185. my $social_media_url = $social_media_urls->{$social_media_name};
  186.  
  187. print($social_media_name . ' : ' . $social_media_url . "\n\n");
  188. }
Success #stdin #stdout 0s 4348KB
stdin
Standard input is empty
stdout
google.plus : https://plus.google.com/share?url=https://w...content-available-to-author-only...t.com/&text=EarthFluent&hl=

google.bookmarks : https://www.google.com/bookmarks/mark?op=edit&bkmk=https://w...content-available-to-author-only...t.com/&title=EarthFluent&annotation=EarthFluent&labels=

facebook : http://w...content-available-to-author-only...k.com/sharer.php?u=https://w...content-available-to-author-only...t.com/

reddit : https://r...content-available-to-author-only...t.com/submit?url=https://w...content-available-to-author-only...t.com/&title=EarthFluent

twitter : https://t...content-available-to-author-only...r.com/intent/tweet?url=https://w...content-available-to-author-only...t.com/&text=EarthFluent&via=&hashtags=

linkedin : https://w...content-available-to-author-only...n.com/shareArticle?mini=true&url=https://w...content-available-to-author-only...t.com/&title=EarthFluent&summary=EarthFluent&source=

tumblr : https://w...content-available-to-author-only...r.com/widgets/share/tool?canonicalUrl=https://w...content-available-to-author-only...t.com/&title=EarthFluent&caption=&tags=

pinterest : http://p...content-available-to-author-only...t.com/pin/create/button/?url=https://w...content-available-to-author-only...t.com/

blogger : https://w...content-available-to-author-only...r.com/blog-this.g?u=https://w...content-available-to-author-only...t.com/&n=EarthFluent&t=

livejournal : http://w...content-available-to-author-only...l.com/update.bml?subject=EarthFluent&event=https://w...content-available-to-author-only...t.com/

evernote : http://w...content-available-to-author-only...e.com/clip.action?url=https://w...content-available-to-author-only...t.com/&title=EarthFluent

add.this : http://w...content-available-to-author-only...s.com/bookmark.php?url=https://w...content-available-to-author-only...t.com/

getpocket : https://g...content-available-to-author-only...t.com/edit?url=https://w...content-available-to-author-only...t.com/

hacker.news : https://n...content-available-to-author-only...r.com/submitlink?u=https://w...content-available-to-author-only...t.com/&t=EarthFluent

stumbleupon : http://w...content-available-to-author-only...n.com/submit?url=https://w...content-available-to-author-only...t.com/&title=EarthFluent

digg : http://d...content-available-to-author-only...g.com/submit?url=https://w...content-available-to-author-only...t.com/&title=EarthFluent

buffer : https://b...content-available-to-author-only...r.com/add?text=EarthFluent&url=https://w...content-available-to-author-only...t.com/

flipboard : https://s...content-available-to-author-only...d.com/bookmarklet/popout?v=2&title=EarthFluent&url=https://w...content-available-to-author-only...t.com/

instapaper : http://w...content-available-to-author-only...r.com/edit?url=https://w...content-available-to-author-only...t.com/&title=EarthFluent&description=

surfingbird.ru : http://s...content-available-to-author-only...d.ru/share?url=https://w...content-available-to-author-only...t.com/&description=&screenshot=&title=EarthFluent

flattr : https://f...content-available-to-author-only...r.com/submit/auto?user_id=&url=https://w...content-available-to-author-only...t.com/&title=EarthFluent&description=EarthFluent&language=&tags=&hidden=HIDDEN&category=

diaspora : https://s...content-available-to-author-only...n.org/?title=EarthFluent&url=https://w...content-available-to-author-only...t.com/

qzone : http://s...content-available-to-author-only...q.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=https://w...content-available-to-author-only...t.com/

vk : http://content-available-to-author-only.com/share.php?url=https://w...content-available-to-author-only...t.com/&title=EarthFluent&comment=

weibo : http://s...content-available-to-author-only...o.com/share/share.php?url=https://w...content-available-to-author-only...t.com/&appkey=&title=EarthFluent&pic=&ralateUid=

ok.ru : https://c...content-available-to-author-only...k.ru/dk?st.cmd=WidgetSharePreview&st.shareUrl=https://w...content-available-to-author-only...t.com/

douban : http://w...content-available-to-author-only...n.com/recommend/?url=https://w...content-available-to-author-only...t.com/&title=EarthFluent

xing : https://w...content-available-to-author-only...g.com/app/user?op=share&url=https://w...content-available-to-author-only...t.com/

renren : http://w...content-available-to-author-only...n.com/dialog/share?resourceUrl=https://w...content-available-to-author-only...t.com/&srcUrl=https://w...content-available-to-author-only...t.com/&title=EarthFluent&description=

threema : threema://compose?text=EarthFluent&id=

sms : sms:?body=EarthFluent

line.me : https://l...content-available-to-author-only...e.me/share/ui?url=https://w...content-available-to-author-only...t.com/&text=EarthFluent

skype : https://w...content-available-to-author-only...e.com/share?url=https://w...content-available-to-author-only...t.com/&text=EarthFluent

telegram.me : https://content-available-to-author-only.me/share/url?url=https://w...content-available-to-author-only...t.com/&text=EarthFluent&to=

email : mailto:?subject=EarthFluent&body=

gmail : https://mail.google.com/mail/?view=cm&to=&su=EarthFluent&body=https://w...content-available-to-author-only...t.com/&bcc=&cc=

yahoo : http://c...content-available-to-author-only...o.com/?to=&subject=EarthFluent&body=EarthFluent