arusahni / ngtweet

Easily embed Twitter widgets into your Angular application! No more having to kludge together a Twitter script loader, or manage embed state on route/visibility change.
http://arusahni.github.io/ngtweet/
MIT License
34 stars 22 forks source link

cannot seem to load widget #32

Closed lordlabakdas closed 7 years ago

lordlabakdas commented 7 years ago

Wanted to post a question rather than an issue.

I cannot seem to be able to load the widget for some reason. I only get the default HTML href behavior instead of the Load widget functionality shown in your webpage on my ionic app.

Installed ngtweet using bower $ bower install ngtweet

Linked ngtweet.min.js file to index.html and verified through console and sources that it is being called <script src="lib/ngtweet/dist/ngtweet.min.js"></script>

HTML as shown below:

<ion-view view-title="About">
       <ion-content class="padding">
         <h3>lordlabakdas's tab</h3>
         <twitter-timeline>
    <a class="twitter-timeline" href="https://twitter.com/search?q=weather%20lawrence%20kansas&src=typd" data-widget-id="673710543212052480"> Tweets from Lawrence Weather</a>
        </twitter-timeline>
    </ion-content>
</ion-view>

Is there something I am missing in my setup?

arusahni commented 7 years ago

What platform are you testing on?

lordlabakdas commented 7 years ago

OS: Ubuntu 14.04 64 bit

arusahni commented 7 years ago

It appears that you're not using the right value for data-widget-id (instead using one from the sample). This value is generated by Twitter, and requires for you to register a timeline with them via this page: https://twitter.com/settings/widgets/new/search

That will give you the snippet to embed.

lordlabakdas commented 7 years ago

still does not work....I created a widget from the link you sent and pasted in the anchor tag in between <twitter-timeline></twitter-timeline>

arusahni commented 7 years ago

Do you see any errors or warnings in the log if you use ngtweet.js instead of the minified version?

lordlabakdas commented 7 years ago

No logs are seen when using ngtweet.js

arusahni commented 7 years ago

Have you added the ngtweet dependency to your Angular app? i.e.

angular.module("yourapp", ['ionic', 'ngtweet']);
lordlabakdas commented 7 years ago

ah, missed that! Now it works. Thanks for the support.