Social Networks
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,
- <meta property="og:title" content=".Net Bug Buster" />
- <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." />
- <meta property="og:url" content="http://dotnetbugbuster.byethost7.com" />
- <meta property="og:image" content=http:
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,
- <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;" >
- <img src="http://stage.nursingcenter.com/app_themes/share_icons/facebook.png" alt="facebook" /></a></td>
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:
- <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;">
- <img src="http://stage.nursingcenter.com/app_themes/share_icons/twitter.png" alt="twitter" /></a>
LinkedIn - <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;">
- <img src="http://stage.nursingcenter.com/app_themes/share_icons/linked-in.png" alt="Linked In" /></a>
Google + - <a title="Share on Google+" href=https:
- <img src="http://stage.nursingcenter.com/app_themes/share_icons/gplus.png" alt="Google +" /></a>
Reddit - <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;">
- <img src="http://stage.nursingcenter.com/app_themes/share_icons/redit.png" alt="Google +" /></a>
In the above links, to open a page in popup window I have used the following JavaScript function,
- <script type="text/javascript">
- function popupwindowAtCenter(url, title, w, h)
- {
- var left = (screen.width / 2) - (w / 2);
- var top = (screen.height / 2) - (h / 2);
- 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);
- }
- </script>
Email Services
If you need to share your page link or text with email services like Gmail, Yahoo, and Outlook,
Outlook
- <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">
- <img src="http://findicons.com/files/icons/2779/simple_icons/64/outlook_64_black.png" alt="outlook" /></a>
Gmail - <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">
- <img src="http://findicons.com/files/icons/820/simply_google/64/google_gmail.png" alt="gmail" /></a>
Yahoo
- <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">
- <img src="http://findicons.com/files/icons/832/social_and_web/64/yahoo.png" alt="yahoo" /></a>
Outlook Web - <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">
- <img src="http://findicons.com/files/icons/2795/office_2013_hd/64/outlook.png" alt="Outlook web" /></a>