Linked in/Facebook/twitter share button code added to site master not working

Aug 13, 2011 at 12:00 AM

Hi

Linked in/Facebook/twitter share button code added to a theme's site master makes succeeding html content disappear.

example code entered in sitemaster (menu section for example):

        <a class='twitter-share-button' data-count='horizontal' data-text='Check out www.kuraltoday.com..!'
            data-url='www.kuraltoday.com' data-via='kuraltoday' href='http://twitter.com/share'>
            Tweet</a><script src='http://platform.twitter.com/widgets.js' type='text/javascript' />

 

PLease help I am struggling with this issue past two nights...

Aug 13, 2011 at 12:44 AM
Edited Oct 24, 2011 at 8:08 PM

Why not just add the "AddThis"  extension?

 

http://dnbegallery.org/cms/List/Extensions/AddThis

Java Blog

Aug 13, 2011 at 12:46 AM

I want the share buttons in specific locations in the site's header..

Aug 13, 2011 at 12:58 AM

Can you get the site.master   code and not the client side code after BE process it?

 

Could be the site.master

 

Need to see that code :)

 

If possible the entire site.master

 

I bet there's something missing like a closing tag or something.

 

Also BE injects code into the page when it processes which sometimes effects

your code too.

 

Its more likely one of those issues.

 

Can you also put it live on your server so I can see it?

 

The post BE code?

 

As of right  now : http://www.kuraltoday.com/

 

Does not have the share codes there :)

Aug 13, 2011 at 1:52 AM

I see you also posted this on the Stack Overflow :)

 

I answered your question there :

 

site.master

<div style="float:right; padding-left:10px" class="TwitterButton">
<div>
<a href="http://twitter.com/share" class="twitter-share-button" data-url=         
<%=Server.UrlEncode(Post.AbsoluteLink.ToString()) %> data-text="  
<%=Server.UrlEncode(Post.Title) %>"> Tweet</a>
<script src="http://platform.twitter.com/widgets.js" type="text/javascript">
</script>
</div>
</div>

The output would look like this:

<div style="float:right; padding-left:10px" class="TwitterButton">
<div>
<a href="http://twitter.com/share" class="twitter-share-button"    
data-url="http://www.kbdavis07.bloggersonline.com/post/Using-HitSniffercom-  
with-BlogEngineNet.aspx" data-text="Using HitSniffer.com with BlogEngine.Net"   
data-count="horizontal">Tweet</a>
<script src="http://platform.twitter.com/widgets.js" type="text/javascript">
</script>
</div>
</div>

This code above is for twitter I don't have a working example of Linkin code. But should be about the same .