question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Twitter widget not rendering

See original GitHub issue

Is this a bug report or a feature request?

Bug report

Have you read the guidelines regarding bug report?

Yes

Have you read the documentation in its entirety?

Yes

Have you made sure that your issue hasn’t already been reported/solved?

Yes

Is the bug specific to iOS or Android? Or can it be reproduced on both platforms?

I have reproduced the issue on iOS

Is the bug reproductible in a production environment (not a debug one)?

Yes

Have you been able to reproduce the bug in the provided example?

Yes

Environment

Environment: React: 16.6.1, React native: 0.57.7, react-native-render-html: ^4.1.2

Target Platform: iOS (12.0)

Steps to Reproduce

(Write your steps here:)

In html prop, pass the following html string:

  <blockquote class="twitter-tweet" data-lang="en">
                <p dir="ltr" lang="en">"We can improve on that one."
                    <br />
                    <br /> Ole joined us on <a href="https://twitter.com/hashtag/MUTV?src=hash&ref_src=twsrc%5Etfw">#MUTV</a> after yesterday's game... <a href="https://t.co/F0oOm25bNx">pic.twitter.com/F0oOm25bNx</a></p> — Manchester United (@ManUtd) <a href="https://twitter.com/ManUtd/status/1112264634264768512?ref_src=twsrc%5Etfw">March 31, 2019</a></ blockquote>
<script async="async" src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

as html={html string here}

Expected Behavior

The script tag should have caused a webview to render with the tweet embedded via the te

Screenshot 2019-04-01 19 43 41

Actual Behavior

The text got rendered but the script tag for twitter widget did not work.

Screenshot 2019-04-01 19 35 37

Reproducible Demo

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
ssingh1984commented, Jun 2, 2020

@salhotra Will you pls share the code if you have to handle twiiter widget rendering.

0reactions
sadiefpcommented, Oct 28, 2022

Not sure if this will help anyone, but I was able to get the tweet’s url from within a custom blockquote renderer: tnode?.children[1]?.children[0]?.children[1]?.attributes?.href

Read more comments on GitHub >

github_iconTop Results From Across the Web

Twitter Widget Not Always Loading - Stack Overflow
Sometimes, the widget will disappear only leaving a Link to the Twitter. I am just running the webpage locally on my hard drive....
Read more >
Twitter widget not displaying for WordPress after https upgrade
Twitter widget not displaying for WordPress after https upgrade. The widget is showing up as a link. Anyone know a workaround? www.caelusgreenroom.com.
Read more >
Timeline isn't rendering · Issue #45 - GitHub
The timeline component seems to have broken recently (perhaps due to an update to Twitter API or something?) All Timeline components seem to ......
Read more >
Twitter timeline widget no longer working - WordPress.com
Hi Here's my site: Up until recently I had a twitter timeline widget on the left handside of the home page but this...
Read more >
Twitter widget not rendering in Firefox only
If you mean the company's Twitter page itself, directly on Twitter, then no it doesn't fail to load in Firefox. It's the embedded...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found