Hi,
I integrated my anguklarjs webapp with webintents:
-
I put <script id="twitter-wjs" src="//platform.twitter.com/widgets.js"></script> in my head section
-
I created this kind of markup: <a href="https://twitter.com/intent/like?tweet_id={{campaign.object.id}}">interact</a>
-
I put this javascript
twttr.ready(
function (twttr) {
twttr.events.bind('like', function(event) {
var likedTweetId = event.data.tweet_id;
alert(likedTweetId);
});
});
Then I get two issues:
- On click event on the html markup, I get an alert with undefined
- After interaciont is done, I don’t get any event
Here is a demo (although in this code there isn’t the first issue)
Demo
What am I missing?