Lisa Van Daele
Lisa Van Daele

Reputation: 95

javascript twitter event and get tweeted text

can someone help me with this problem?

Here is my code:

<div>
   <a href="http://twitter.com/share" class="twitter-share-button"
     data-text="testing this tweet"
     data-count="none">Tweet</a>
</div>

<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
<script type="text/javascript">
 twttr.events.bind('tweet', function(event) {
console.log(event);
    alert("tweeted");
  });
</script>

When somebody clicks on the "Tweet" button an iframe is visible with the tweet text. When tweeted my alert box is shown. That's all good...

But you still can change the tweet text in the iframe. I only want to show the alert when the correct text is tweeted, can I get that out of the event?

Upvotes: 1

Views: 114

Answers (1)

Kawebah
Kawebah

Reputation: 71

I had the same issue :( unfortunately the answer is no. There is no way to find out what the user tweeted, this info is not part of the callback available on the web intents. According twitter you would need to know who the user is to get the tweet, and to get this info you need to go thru the oAuth workflow and use the REST api.

Upvotes: 1

Related Questions