Javascript event for when post arrives

javascript
events
embeddedtimeline

#1

Hi

Say I want to create an embedded timeline on my website

https://dev.twitter.com/docs/embedded-timelines

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

Cheers

Dave


#2

You can display a user timeline with a specified username using the twttr.widgets.createTimeline JavaScript factory function.
https://dev.twitter.com/web/embedded-timelines/user

Register a callback for Twitter widgets JavaScript events to track when the widget has rendered.
https://dev.twitter.com/web/javascript/events


#3

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

Cheers

Dave


#4

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!

Ben


#5

Hi Ben

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

Cheers

Dave


#6