ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

how to twitt this

January 03, 2010 6:22am

Subscribe [6]
  • #1 / Jan 03, 2010 6:22am

    George K

    75 posts

    according to what I have read on the internet, the twit code for publishing on twitter looks somthing like this (in EE code):

    <ahref=”http://twitter.com/home?status={title} <a href="http://www.market-talk.net/index.php/id/{entry_id}&gttwit">http://www.market-talk.net/index.php/id/{entry_id}">twit</a> this</a>


    The problem is that it does not work. I have tried to use a plugin made for EE for the specific purpose, but I cant seem to make it work.

    Why is this code wrong?? What do I have to do to make it work?

  • #2 / Jan 03, 2010 6:34am

    George K

    75 posts

    For some reason I seem to be the only EE user that cant find a way to put a twitter button on my pages so people can send my posts to twitter.

    I have tried 2 plugins made for EE but they dont seem to work, or there are issues ... one of which is encoding related.

    My question is, what can I do about this?? Does anybody have any code or something else I can use??

    regards

  • #3 / Jan 03, 2010 10:22am

    ee_sa

    56 posts

    You have to put this:

    <a href="http://twitter.com/home?status=Currently" title="Click to send this page to Twitter">_  Path/To/Image_</a>

    Just play with link: {site_url}{title_permalink='Template/'}

  • #4 / Jan 03, 2010 10:44am

    Mark Bowen

    12637 posts

    Hi George,

    In what way isn’t it working?

    I notice that in your code above you have ahref=”“ where as it should be a href=”“. Could that be it perhaps?

    Also make sure that you have that code placed within a weblog tag so that the {title} and {entry_id} variables get converted to the values you need.

    Hope some of that helps a bit.

    Best wishes,

    Mark

  • #5 / Jan 03, 2010 11:34am

    George K

    75 posts

    Mark no thats not it. ahref was deliberate so the code can be visible in this forum.

    I have evclosed a pic of the exact code.

    Also, this is a test template

    http://www.market-talk.net/index.php/id/7809/

    Below the facebook share at the bottom is the twit code.

    As you can see, he {title} and {entry_id) is rendered ok, but the layout is all wrong.

    I just cant figure why it is rendered the way it is rendered.

  • #6 / Jan 03, 2010 11:43am

    George K

    75 posts

    Do I have to use

    {site_url}{title_permalink='Template/'}???

    Cant I simply use

    /index.php/id/{entry_id}"  title="{title}"
  • #7 / Jan 03, 2010 11:44am

    George K

    75 posts

    Do I have to use

    {site_url}{title_permalink='Template/'}???

    Cant I simply use

    /index.php/id/{entry_id}"  title="{title}"

    http://www.market-talk.net/index.php/id/7809/

    the link above is where I am doing some tests.

    The rendering is all wrong.

  • #8 / Jan 03, 2010 1:02pm

    Mark Bowen

    12637 posts

    Hmm that seems really odd to me as you have the twitter.com part first in the link and then your link afterwards yet in the rendered link they come out back to front.

    Actually looking at the image code you have shown above I see a couple of problems.

    Perhaps give this a try instead.

    <ahref='http://twitter.com/home?status=Currently reading {site_url}id/{entry_id}' title='{title}'>twit this</a>

    Add back in the space to href of course 😉 Sorry didn’t realise that links don’t show correctly when placed into code here

    Hope that works.

    Best wishes,

    Mark

  • #9 / Jan 03, 2010 2:14pm

    Mark Bowen

    12637 posts

    Perhaps this thread should be merged with this one - http://ellislab.com/forums/viewthread/140133 ?

    Also as a note it’s best not to post in multiple forums with the same question. Just a note though 😉

  • #10 / Jan 03, 2010 2:51pm

    Greg Salt

    3988 posts

    Hi George,

    Has Mark’s advice helped you with this? If you check your code in the image you will see that you have formed your HTML incorrectly and as Mark suggests you need to properly quote both the URL and the title.

    Cheers

    Greg

    @Mark, thanks for the assist!

  • #11 / Jan 03, 2010 7:00pm

    George K

    75 posts

    Greg thanks, Mark showed me the problem and now it works ok.

    One more thing, I keep getting encoding errors. Any ideas??

  • #12 / Jan 04, 2010 1:39am

    John Henry Donovan

    12339 posts

    George,

    One more thing, I keep getting encoding errors. Any ideas??

    What encoding errors?
    An EE error or a browser error?

    What version and build of EE are you using?
    Have you tried using UTF-8 encoding instead?

  • #13 / Jan 04, 2010 3:29am

    George K

    75 posts

    No I use windows-1253, an extinct relic, but only beacuse I have not found a way to convert my mysql to UTF-8.

    Any ideas on how to do that?? I have searched the whole internet and still cant find an easy way to do it.

  • #14 / Jan 04, 2010 11:46am

    Sue Crocker

    26054 posts

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases