Okay
  Public Ticket #142452
Twitter Sharing - add: Via @username
Closed

Comments

  • Howard started the conversation
    Hi again! Quick question (hopefully). When someone shares a post from my site using the Twitter icon, how can I add my username to the Tweet. Currently it displays the title and URL. I'd love something like: "New from @username! {Title} - {URL}". Is this possible? Thanks!
  •  1,043
    ThemeNectar replied

    Hey Howard,

    open up the init.js file located in the js folder and search for

    function twitterShare()

    " to end up at the right place. Now you can modify what's going on in there i.e.

    window.open( 'http://twitter.com/intent/tweet?text='+$(".section-title h1").text() +' '+window.location, "twitterWindow", "height=380,width=660,resizable=0,toolbar=0,menubar=0,status=0,location=0,scrollbars=0" ) 

    to add what were looking for it would look like this:

    window.open( 'http://twitter.com/intent/tweet?text=New from @username! '+$(".section-title h1").text() +' '+window.location, "twitterWindow", "height=380,width=660,resizable=0,toolbar=0,menubar=0,status=0,location=0,scrollbars=0" ) 

    Cheers :)

  • Howard replied

    You are fantastic! Thanks again for the help!