Twitter embedded timeline
Purpose
Helps with implementing Twitter embedded timelines.
Working example
How to implement
- Create an embedded timeline on Twitter.com according to Twitter's Creating an Embeddable Timeline documentation.
- For each area that will display a Twitter embedded timeline, create a
div
element withclass="wb-twitter"
.<div class="wb-twitter"></div>
- Inside the
div
element add a link with:class="twitter-timeline"
href
attribute with the URL for the equivalent query on Twitter.com (e.g., https://twitter.com/search?q=%23WxT)widget-id
attribute with the id of the embedded timeline (e.g., "329066756620566528")- link text that describes timeline (e.g.,
Tweets about "#WxT"
)
<div class="wb-twitter"> <a class="twitter-timeline" href="https://twitter.com/search?q=%23WxT" data-widget-id="329066756620566528">Tweets about "#WxT"</a> </div>
- Configure the timeline according to Twitter's Customization Options documentation.
Configuration options
All configuration options are detailed in Twitter's Customization Options documentation.
Events
Event | Trigger | What it does |
---|---|---|
wb-init.wb-twitter |
Triggered manually (e.g., $( ".wb-twitter" ).trigger( "wb-init.wb-twitter" ); ). |
Used to manually initialize the Twitter embedded timeline. Note: The Twitter embedded timeline will be initialized automatically unless the required markup is added after the page has already loaded. |
wb-ready.wb-twitter (v4.0.5+) |
Triggered automatically after the Twitter embedded timeline initializes. | Used to identify where the Twitter embedded timeline was initialized (target of the event).
|
wb-ready.wb (v4.0.5+) |
Triggered automatically when WET has finished loading and executing. | Used to identify when all WET plugins and polyfills have finished loading and executing.
|
Source code
- Date modified: