Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9142213
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:44:52+00:00 2026-06-17T09:44:52+00:00

I need to create multiple tweet buttons, after the page has loaded. Each button

  • 0

I need to create multiple tweet buttons, after the page has loaded. Each button will be tweeting a url that is different from the page that they sit on. I understand that I need to append an appropriate data-url attribute to each tweet button, to achieve this.

But, the Twitter API doesn’t seem to provide a straight-forward way to do the above, dynamically, using Javascript, after page load. I’ve seen a couple of suggestions on StackOverflow and other sites, which hint at re-loading the widgets.js script whenever a new tweet button needs to be created: How can I dynamically create a tweet button?

Are there any other options to do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T09:44:53+00:00Added an answer on June 17, 2026 at 9:44 am

    You can automatically compose a tweet on behalf of the user by redirecting them to a URL that looks like the following:

    http://twitter.com/home?status=Hey+check+out+this+cool+site+http://www.stackoverflow.com/

    So in answer to your question – if i’ve understood correctly – you could just create a couple of different anchors with that link as the HREF:

    <a href="http://twitter.com/home?status=Hey+check+out+this+cool+site+http://www.stackoverflow.com/" target="_blank">Tweet about Link a</a>
    

    EDIT:

    Upon further investigation, it’s actually pretty easy to use the tweet button with count for different URLs by setting some data attributes

    I knocked up a quick jsfiddle for you: http://jsfiddle.net/rghCG/

    More info about what you can do with the tweet button: https://dev.twitter.com/docs/tweet-button

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to create a WP site which will have multiple subjects. Each subject
I need to create multiple search fields that each search different content in WordPress.
I need to create multiple /testcontainer: parameters to feed into a task that exec's
I need to create multiple threads when a button is clicked and i've done
I need to create multiple records in sqlserver, each with the same value in
I need to create a drop down list that contain multiple checkboxes as well
I have some part imports that I need to create multiple instances of. By
Background: I have a project where i need to create multiple objects that consume
I want to dynamically create multiple Process es, where each instance has a queue
I have a need to create multiple processing threads in a new application. Each

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.