close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Adding text to twitter (social media)

Thread began 2/25/2013 9:09 pm by sales351414 | Last modified 2/27/2013 2:53 pm by sales351414 | 861 views | 2 replies |

sales351414

Adding text to twitter (social media)

I am trying to add text to the social media button for twitter and am not having much luck. Can you point me in the right direction.

This code (not using webassist) works

<a href="https://twitter.com/share" class="twitter-share-button" data-text="Check out Broker South in Vicksburg, MS" >Tweet</a>
<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>


When I use web assist social media and add the text option it is not working.
(I would prefer to have the text show up first then the URL but would be happy to get any of it working)

Social Media code
<div id="custom-tweet-button">
<a href="https://twitter.com/share?url=<?php echo urlencode(((!empty($_SERVER["HTTPS"])) ? "https://" : "http://") . $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]); ?>" data-text="Check out Broker South in Vicksburg, MS" target="_blank"><img src="../webassist/social/icons/twitter.png" alt="Twitter" border="0" title="Twitter" /></a>
</div>

Sign in to reply to this post

Jason ByrnesWebAssist

so, your trying to set the default tweet text?


the data-text parameter is only available to Javascript tweet button.

using standard image tweet buttons, you need to pass the text as a parameter to the share link:

<a href="https://twitter.com/share?url=<?php echo urlencode(((!empty($_SERVER["HTTPS"])) ? "https://" : "http://") . $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]); ?>&text=Check out Broker South in Vicksburg, MS" target="_blank">


tweet-button

Sign in to reply to this post

sales351414

Thank you for your help.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...