homepage Welcome to WebmasterWorld Guest from 54.205.207.53
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Content Management
Forum Library, Charter, Moderators: ergophobe

Content Management Forum

    
Need help in creating HTML-only social Share buttons for blog
AimyThomas



 
Msg#: 4490375 posted 4:05 am on Sep 1, 2012 (gmt 0)

Hi,
I want to develop a simple social sharing widget for blog. It is too slow in loading and their tacks add to page load time too much. Thatís what I decided to go with an easy widget but without any Java script.

So I now what the problem I am facing is I have developed CSS sprite images but I donít know what "href" string i should enter for each social media like twitter, Facebook, Google plus, pinterest and Linkedin.

The requirement is, if someone want to share the post to twitter, and when he click on the tweet button, the the URL of page and the title of the post should automatically go to the tweet.

I tried using href="https://facebook.com/share""
but it only gives URL of the source page and not the post title. Same is the case with twitter. When I click on the twitter share button, only blank share popup opens.
Please help me .

Thanks in Advance

 

ergophobe

WebmasterWorld Administrator ergophobe us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 4490375 posted 4:13 pm on Sep 1, 2012 (gmt 0)

For Twitter you'll need to do something like this:

<a href="https://twitter.com/share" class="twitter-share-button" data-url="http://example.com">Text to Tweet</a>

Where example.com is the URL to tweet and Text to Tweet is, well, the text. Here are some docs:

https://dev.twitter.com/docs/tweet-button/faq
https://dev.twitter.com/docs/tweet-button
[twitter.com...]

You'll need to find similar documentation for each service you want to use and then roll your own implementation.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Content Management
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved