Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting tweet event calllback #36

Closed
shivaenigma opened this issue Sep 22, 2018 · 5 comments
Closed

Getting tweet event calllback #36

shivaenigma opened this issue Sep 22, 2018 · 5 comments

Comments

@shivaenigma
Copy link

shivaenigma commented Sep 22, 2018

Hi,
First of thanks a lot in making this ... I tried a lot getting twitter widget working with my ng-view switching, ultimately your library is only one working !

I want a simple function callback on

twttr.events.bind(
  'tweet',
  function (event) {
    // Do something there
  }
); 

If you cannot add this to code right now, please let me know how to do this so that I can change my files. Need this ASAP !

Thanks a lot

@arusahni
Copy link
Owner

I'm tracking eventing in #3. If you needed to do something quick and dirty, I'd put something alongside this line: https://github.com/arusahni/ngtweet/blob/develop/src/twitterWidget.service.js#L47

Thanks for using the library!

@shivaenigma
Copy link
Author

@arusahni yes, I saw https://github.com/arusahni/ngtweet/blob/develop/src/twitterWidget.service.js#L47.. I wasn't sure how to callback a method in $scope of my controller from that. Can you please help me with a snippet for that

@shivaenigma
Copy link
Author

Hi @arusahni any thoughts on when you could get time to do this

@arusahni
Copy link
Owner

You could probably accomplish this by adding an additional scope parameter to one of the directives (e.g., twitterWidget that accepts a function param (similar to twitterWidgetOnRendered), and then pass that into the createTweet method.

If you instead want a singleton function, you could probably do the same with twitterWidgetInitialize.

@blockonomics
Copy link

Thanks @arusahni , I have done some hacks stuff in my callback function to achieve what I want. Will wait for #3 to do this properly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants