Hello !
I am using the Twitter Widget on my React app, but it just renders a link without the timeline. In my console I get two errors from the twitter script : GET about:blank net::ERR_UNKNOWN_URL_SCHEME

Here is the code I use in my component :

useEffect(() => {
    window.twttr.widgets.createTimeline(
      {
        sourceType: 'url',
        url: 'https://twitter.com/twitterdev'
      },
      document.getElementById('twttr-container')
    );
  }, [])

Thanks if anyone can help me !

Hi @yann_jacquet,

If you’re trying to make a profile timeline widget, you can follow the docs here: Profile Timeline | Docs | Twitter Developer Platform.

I believe you need to use values like this:

{
    sourceType: "profile",
    screenName: "TwitterDev"
}

I hope that helps!

1 Like

Thanks for your reply !

Unfortunately, it didn’t help.
I discovered that my code works in Firefox but not in Chrome, so I don’t really know where it comes from or what to do

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