2

I want to use a twitter timelines fonctionalities provides by twitter publish like this one :

<a class="twitter-timeline" href="https://twitter.com/Alten_france?ref_src=twsrc%5Etfw">
 Tweets by Alten_france
</a> 
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

It would seem that we can no do that with react-native.

I have found that in stack over flow : Twitter widget inside WebView in React Native but I can not run it. I Don't know why.

Could anyone try to combine this html provided by twitter.publish with the code advised in stackoverflow link ?

Thanks in advance.

does anyone have a solution to solve that ? are there some exit librairie to do that ? I konw that in react-js there are a libraise such as tiwtter embed but I have not found any solution in react-native

Thanks in advance for our feedback

acarlstein
  • 1,799
  • 2
  • 13
  • 21
samuel
  • 21
  • 3
  • I would advice to add some code into your question. Something that you have tried already. In this way, you will increase the changes of receiving help and reduce the chances of having your question flagged and closed. – acarlstein Apr 20 '19 at 15:59
  • Yes thanks for advising. I put more details now into my question – samuel Apr 21 '19 at 17:21
  • I got this one to work: https://stackoverflow.com/a/39018867/4488853 I updated the code with a tweet myself here: https://gist.github.com/SaraChicaD/b79db4e96970e06be0f7a0417e787a28 – Sara Inés Calderón Oct 28 '19 at 18:03

1 Answers1

0

Update 2023 can you do it easier with react-native-twitter-preview and display tweets or profiles, just pass a url with the package: https://www.npmjs.com/package/react-native-twitter-preview

usage:

<TwitterPreview
  url={'https://twitter.com/elonmusk/status/1636162726140493825'}
/>
Idan
  • 3,604
  • 1
  • 28
  • 33