saurabhnemade / react-twitter-embed

Simplest way to add twitter widgets to your react project.
https://saurabhnemade.github.io/react-twitter-embed/
367 stars 66 forks source link

Twitter timeline not work #87

Closed thanhvk closed 3 years ago

thanhvk commented 3 years ago

Hi, I'm using the twitter-timeline-embed package to display the timeline of a list in my project but recently it did not work. And when I use chrome it shows this bug Screen Shot 2021-07-30 at 13 42 52

The same bug on the demo page https://saurabhnemade.github.io/react-twitter-embed/?path=/story/twitter-timeline-embed--timeline-profile-with-screen-name

vishishttiwari commented 3 years ago

Same here, this has stopped working

thanhvk commented 3 years ago

It seems a bug of Twitter because it from https://platform.twitter.com/widgets.js file

asnurinsyahirah commented 3 years ago

I fixed the issue by tweaking the solution provided here: https://github.com/andrewsuzuki/react-twitter-widgets/issues/45#issuecomment-889740825

`import { TwitterTimelineEmbed } from 'react-twitter-embed'

export default function App() { return ( <TwitterTimelineEmbed sourceType="profile" screenName="TwitterDev" options={{ id: "profile:TwitterDev" }} /> ); } `

Hope this helps!

thanhvk commented 3 years ago

@asnurinsyahirah thanks! it works for me

<TwitterTimelineEmbed
  sourceType="list"
  id="yourlistId"
  options={{height: 500, id:"list:yourlistId"}}
  noScrollbar
  noHeader
/>