0

I'm trying to allow a user to create a tweet from content on a page. I am listing a schedule of events on a page and would like the user to if they like click a button to send out a tweet per event. Just looking for someone to point me in the right direction. Thanks!

Event 1, 8:00 AM, Room: 101 [tweet this]
Event 2, 9:00 AM, Room: 102 [tweet this]
Event 3, 10:00 AM, Room: 103 [tweet this]
TJnTN
  • 57
  • 2
  • 9

1 Answers1

0

Check official Twitter documentation:

https://dev.twitter.com/docs/tweet-button#ways-to-add-the-tweet-button-to-your-website

You can add Tweet Buttons using javascript and then set attributes for them:

<a href="https://twitter.com/share" class="twitter-share-button" data-lang="en" data-text="YOUR TEXT">Tweet</a>

This might help you - set Tweet button 'data-text' contents dynamically with javascript, or..?

Community
  • 1
  • 1