You can add a “Tweet this” link to your DataPage to allow your end-users to update their status on Twitter directly from your app. You can pass parameters directly from Caspio to the status message. This article shows you how to add a “Tweet this” link as well as how to automatically hash tag a keyword in the tweet.
- Copy the following HTML for a “Tweet this” image link. Include this link wherever you enter HTML including headers, footers, and HTML blocks. It is especially suitable to be included in a confirmation message, as this is an appropriate time for an end-user to update their Twitter status.
- Replace the “Keyword” and “Message” texts to match your website. The keyword is automatically hash tagged so that Twitter users can easily follow and see real time usage (http://www.hashtags.org/) of that keyword. Be sure you don’t use a keyword that is already used in another conversation. You can also add parameters to the tweet to make it dynamic, as in this example:
- You could also simply delete both sections and allow your end-user to write their own tweet. If you choose to delete both sections, remember to also remove the “%23” as this is the HTML character for the hash symbol (#).
- Optional: Change the image icon.You can replace the image source in the sample link with another image on your server. There are many Twitter icons available for free. Be sure to check the licensing.
<a title="Click to tweet!" href="http://twitter.com/home?status=#Keyword Message" target="_blank" rel="noopener"><img src="http://twitter-badges.s3.amazonaws.com/t_logo-a.png" alt="Tweet this!" border="0" /></a>