Sharing Your Application Page In Social Networks And With Email Services

Social Networks

Social Networks

Email Services

Social Email Services

To share your page in Social networks, your page must have meta tags for Page title, Url, description and image.

Page Meta Tags

I have mentioned the meta tags of my application page in the following code,

  1. <meta property="og:title" content=".Net Bug Buster" />  
  2.   <meta property="og:description" content=".Net Bug Buster is my personal blog where i can post  ASP.Net, C#, Linq, Kentico, Sql Server, MVC and Azure related articles." />  
  3.   <meta property="og:url" content="http://dotnetbugbuster.byethost7.com" />  
  4.   <meta property="og:image" content=http://lh6.ggpht.com/-adYMuOAYGu0/URlVhxyJk-I/AAAAAAAAE58/CjTB9yVO7Dw/Ghost-who-walks7.png?imgmax=400" />  
Social Network Sharing

Every Social network have share link, you just need to pass some parameters like Url and summary, etc.

Facebook

I have mentioned the code snippet to use Facebook share here,
  1. <a title="Share on Facebook" href="https://www.facebook.com/sharer.php?u=http://dotnetbugbuster.byethost7.com" onclick="popupwindowAtCenter(this.href,'Share on Facebook',600,600);return false;" >  
  2. <img src="http://stage.nursingcenter.com/app_themes/share_icons/facebook.png" alt="facebook" /></a></td>  
Facebook

Twitter

To tweet on twitter it requires Url, source and tweet text. Here you just need to remember tweet should not more than 140 characters including text and Url.

Below I have mentioned the code snippet to use twitter sharer:
  1. <a title="Share on twitter" href="https://twitter.com/intent/tweet?text=.Net%20Bug%20Buster&source= dotnetbugbuster.byethost7.com&url=http://goo.gl/HeCZpI" onclick="popupwindowAtCenter(this.href,'Share on Twitter',600,600);return false;">  
  2. <img src="http://stage.nursingcenter.com/app_themes/share_icons/twitter.png" alt="twitter" /></a>  
Twitter

LinkedIn
  1. <a title="Share on linkedin" href="https://www.linkedin.com/shareArticle?mini=true&url=http://dotnetbugbuster.byethost7.com&title=.Net Bug Buster&summary=.Net Bug Buster is my personal blog where i can post ASP.Net, C#, Linq, Kentico, Sql Server, MVC and Azure related articles&source=Nursingcenter" onclick="popupwindowAtCenter(this.href,'Share on Linked In',600,600);return false;">  
  2. <img src="http://stage.nursingcenter.com/app_themes/share_icons/linked-in.png" alt="Linked In" /></a>  
LinkedIn

Google +

  1. <a title="Share on Google+" href=https://plus.google.com/share?url=http://dotnetbugbuster.byethost7.com&gpsrc=gplp0&btmpl=popup#identifier" onclick="popupwindowAtCenter(this.href,'Share on Reddit',600,600);return false;">  
  2. <img src="http://stage.nursingcenter.com/app_themes/share_icons/gplus.png" alt="Google +" /></a>  
Google plus

Reddit
  1. <a title="Share on Reddit" href="https://www.reddit.com/submit?url=http://dotnetbugbuster.byethost7.com&title=.Net Bug Buster" onclick="popupwindowAtCenter(this.href,'Share on Reddit',600,600);return false;">  
  2. <img src="http://stage.nursingcenter.com/app_themes/share_icons/redit.png" alt="Google +" /></a>  
Reddit

In the above links, to open a page in popup window I have used the following JavaScript function,
  1. <script type="text/javascript">  
  2. function popupwindowAtCenter(url, title, w, h)  
  3. {  
  4.     var left = (screen.width / 2) - (w / 2);  
  5.     var top = (screen.height / 2) - (h / 2);  
  6.     return window.open(url, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width=' + w + ', height=' + h + ', top=' + top + ', left=' + left);  
  7. }  
  8. </script>  
Email Services

If you need to share your page link or text with email services like Gmail, Yahoo, and Outlook,

Email Services

Outlook
  1. <a title="Share with Outlook" href="mailto:?subject=Dotnet bug buster&body=http://dotnetbugbuster.byethost7.com/ <br/>.Net Bug Buster is my personal blog where i can post  ASP.Net, C#, Linq, Kentico, Sql Server, MVC and Azure related articles">  
  2. <img src="http://findicons.com/files/icons/2779/simple_icons/64/outlook_64_black.png" alt="outlook" /></a>  
Outlook

Gmail

  1. <a target="_blank" title="Share with Gmail" href="https://mail.google.com/mail/?view=cm&su=.Net Bug Buster&to&body=http://dotnetbugbuster.byethost7.com/ <br>.Net Bug Buster is my personal blog where i can post ASP.Net, C#, Linq, Kentico, Sql Server, MVC and Azure related articles &scc=1<mpl=default<mplcache=2&emr=1&osid=1#identifier">  
  2. <img src="http://findicons.com/files/icons/820/simply_google/64/google_gmail.png" alt="gmail" /></a>  
Gmail

Yahoo
  1. <a target="_blank" title="Share with Yahoo mail" href="http://compose.mail.yahoo.com/?&Subject=.Net Bug Buster&To=&Body=http://dotnetbugbuster.byethost7.com/<br/>.Net Bug Buster is my personal blog where i can post ASP.Net, C#, Linq, Kentico, Sql Server, MVC and Azure related articles">  
  2. <img src="http://findicons.com/files/icons/832/social_and_web/64/yahoo.png" alt="yahoo" /></a>  
Yahoo

Outlook Web
  1. <a target="_blank" title="Share with Outlook web"  href="https://mail.live.com/default.aspx?rru=compose&subject=.Net Bug Buster&to=&body=http://dotnetbugbuster.byethost7.com/<br><br>.Net Bug Buster is my personal blog where i can post  ASP.Net, C#, Linq, Kentico, Sql Server, MVC and Azure related articles&lc=1033&id=64855&mkt=en-us&cbcxt=mai">  
  2. <img src="http://findicons.com/files/icons/2795/office_2013_hd/64/outlook.png" alt="Outlook web" /></a>  
Outlook Web

 

Up Next
    Ebook Download
    View all
    Learn
    View all