Javascript event for when post arrives




Say I want to create an embedded timeline on my website

how do I receive a notification event that a new post arrives so that I can pre-process the tweet prior to displaying on the website. The other question I have is, is it possible to change the twitter user for the twitter feed in javascript




You can display a user timeline with a specified username using the twttr.widgets.createTimeline JavaScript factory function.

Register a callback for Twitter widgets JavaScript events to track when the widget has rendered.


Thanks for your answer,

I am not sure if by using the embedded timeline widget I have sufficient control over how the tweets display

I would really like to prefilter the timeline before its rendered and perform the rendering myself in HTML/CSS. So for example, I would like to highlight tweets from @TwitterApi then apply custom styling to the tweet. My timeline would be comprise div elements, when a new tweet arrivesa callback event would be received, I could check the tweeter name and if is @TwitterApi apply a class name to the div changing the CSS rendering

Is this kind of scenario possible at all




Hi Dave,

We have rendered and timelineUpdated events that fire when the widget content is displayed on the page and updates, but we don’t have an interface for filtering the timeline content on the client side or customizing the Tweets. We don’t support custom styling of Tweets beyond the theming and link colour options.

What in particular are you trying to customize? It would be informative for future developments to understand what you’re trying to do. Thanks!



Hi Ben

I basically want to filter tweets based on the tweeter, client side, just that really!