Replacing Twitter Tweet Button with Follow Button

Posted in: Newspaper
Post count: 44

Hi,

I’m trying to change the above and below aritcle facebook and twitter from share to follow.

I was successful with facebook but twitter is giving me an issue. here is what I have so far.


        if (td_util::get_option('tds_bottom_like_tweet_show') != 'hide') {
            //classic share buttons
            $buffy .= '<div class="td-classic-sharing">';
	            $buffy .= '<ul>';

	            $buffy .= '<li class="td-classic-facebook">';
                $buffy .= '<iframe frameBorder="0" src="' . td_global::$http_or_https . '://www.facebook.com/plugins/like.php?href=http://facebook.com/gruntstuff' . '&layout=button_count&show_faces=false&width=105&action=like&colorscheme=light&height=21" style="border:none; overflow:hidden; width:105px; height:21px; background-color:transparent;"></iframe>';
	            $buffy .= '</li>';

	            $buffy .= '<li class="td-classic-twitter">';
	            $buffy .= '<a href="https://twitter.com/GruntStuff"> <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>';
	            $buffy .= '</li>';
            
	            $buffy .= '</ul>';
            $buffy .= '</div>';
        }

        $buffy .= '</div>';

        return $buffy;
    }

It’s working perfectly in the share box but below that it adds like 5 other twitter follows… Does anyone know what’s going on here?

Example of duplicate twitter follow buttons

Post count: 44

Bump

Post count: 1291

Hi,

Check the code, you didn’t close the anchor – http://screencast.com/t/wPVleKBsMgzh
Other errors may be present, move it in a code editor and make sure everything is fine.

Thank you!

Post count: 44
Post count: 44

tagdiv forum is not allowing me to paste the code correctly. I apologize.

The code is working, it’s just displaying the follow button a bunch of times. What could cause that?

Post count: 44

Problem Solved. Thank you!

Seems I was missing the > after “data-show-screen-name=”false”

Correct should be: data-show-screen-name=”false”> <script>!functi

simple mistake. Thank for the assistance.

Viewing 6 posts - 1 through 6 (of 6 total)
The forum ‘Newspaper’ is closed to new topics and replies.