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

3 replies
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.
#buttonhelp #problem #twitter
  • Profile picture of the author RobKonrad
    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
    Signature
    ================================================== ===
    This blog is awesome: http://www.robkonrad.com/blog. Read it.
    ================================================== ===
    {{ DiscussionBoard.errors[5245377].message }}
    • Profile picture of the author Buyseech
      It doesnt work sorry. It just ads a Text saying "Tweet" and links to a page-not-found inside my domain.
      {{ DiscussionBoard.errors[5247531].message }}
  • Profile picture of the author RobKonrad
    Hmmm. Sounds like you have a general issue with your page.
    What's your permalink structure?

    Cheers,
    Rob Konrad
    Signature
    ================================================== ===
    This blog is awesome: http://www.robkonrad.com/blog. Read it.
    ================================================== ===
    {{ DiscussionBoard.errors[5251655].message }}

Trending Topics