This code display the correct profile timeline, but “theme” has no effect. I must be missing something obvious? The docs are sparse. Thanks!!

window.onload = function() {
twttr && twttr.widgets.createTimeline({“sourceType”:“profile”,“screenName”:“k4media”,“theme”:“dark”},
document.getElementById(“twitter-stage”)
);
};

Hello!

The first object contains the timeline’s data source options. To customize the theme for the timeline another object needs to be passed in with the theme parameter. See this example JS Bin - Collaborative JavaScript Debugging.

I can see how this can be a bit confusing and we will look into updating our documentation.

1 Like

Thanks! That’s exactly the tip I needed. Now, how could I change light to dark on click?

By “on click” I mean javascript onclick (in case that wasn’t clear) I have a light theme and dark theme that the user can toggle.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.