Chronologie intégrée Twitter

Questions ou commentaires?

Needs translation

Purpose

Helps with implementing Twitter embedded timelines.

Working example

How to implement

Determine the type of timeline at Twitter for Websites
  1. Create you html embedded timline link using Twitter Publish tool or learn more about query generation at Embedded Search Timeline.
    <a class="twitter-timeline" href="https://twitter.com/WebExpToolkit" data-tweet-limit="3" >Tweets by @WebExpToolkit</a>
  2. Wrap the html embedded timline link with a div element with class="wb-twitter".
    <div class="wb-twitter"></div>
  3. With this example your final code should be:
    <div class="wb-twitter">
    <a class="twitter-timeline" href="https://twitter.com/WebExpToolkit" data-tweet-limit="3" >Tweets by @WebExpToolkit</a>
    </div>

Configuration options

All configuration options are detailed in Twitter for Websites 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).
$( document ).on( "wb-ready.wb-twitter", ".wb-twitter", function( event ) {
});
$( ".wb-twitter" ).on( "wb-ready.wb-twitter", function( 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.
$( document ).on( "wb-ready.wb", function( event ) {
});

Source code

Twitter embedded timeline plugin source code on GitHub

Date de modification :