react-tweet-embed

2019-10-10 admin

react-tweet-embed是什么

什么是react-tweet-embed,react component that takes tweet id in props and renders tweet embed, nothing more

react-tweet-embed使用教程帮助文档

react-tweet-embed

Install

npm i react-tweet-embed

Quickstart Edit react-tweet-embed

import TweetEmbed from 'react-tweet-embed'
;<TweetEmbed id="692527862369357824" />

You don’t have to put //platform.twitter.com/widgets.js script in your index.html as this lib will put it there if twttr is not found on window.

Using Options

<TweetEmbed id='783943172057694208' options={{cards: 'hidden' }}/>
<TweetEmbed id='771763270273294336' options={{theme: 'dark' }}/>

Embedded-Tweet Options Reference: https://developer.twitter.com/en/docs/twitter-for-websites/embedded-tweets/guides/embedded-tweet-parameter-reference

本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处。

转载请注明:文章转载自 JavaScript中文网 [https://www.javascriptcn.com]

本文地址:https://www.javascriptcn.com/read-77037.html

文章标题:react-tweet-embed

回到顶部