I got a problem with a Twitter button..help?:)

by 3 replies
4
Hi there,

so the code goes a little something like this :

<a style="float: left;" href="http://twitter.com/share" class="twitter-share-button" data-url="<?php echo urlencode(get_permalink($post->ID)); ?>" >Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>

The twitter button is shown, its clickable, it does its job EXCEPT the fact that the tweet does not include a link at all. Is there something wrong with this code or does the problem lie somewhere else?

I am waiting for the guy who made my site, but he is a slow responder. Any ideas?

Thank you.
#programming #buttonhelp #problem #twitter
  • Try this one:

    <a href=”http://twitter.com/share” data-text=”<?php the_title(); ?>” data-url=”<?php the_permalink() ?>” data-count=”vertical” >Tweet</a><script type=”text/javascript” src=”http://platform.twitter.com/widgets.js”></script>

    Cheers,
    Rob
    • [1] reply
    • It doesnt work sorry. It just ads a Text saying "Tweet" and links to a page-not-found inside my domain.
  • Hmmm. Sounds like you have a general issue with your page.
    What's your permalink structure?

    Cheers,
    Rob Konrad

Next Topics on Trending Feed