Very good like always 😉
NodeBB Twitter / X embeds
-
I’ve had limited success with the plugin
nodebb-plugin-twitter
and its various forks in the sense that the embeds failed to load - here’s an example of that exact problem (never resolved from what I can see)https://github.com/NodeBB-Community/nodebb-plugin-twitter/issues/2
I decided to write my custom
JS
which can be found herehttps://github.com/phenomlab/nodebb-twitter-embeds
This not only works in the same way as the NodeBB plugin, but will also render client-side so does not pile up in terms of resources on your server In addition, the available arguments for the embeds are below
Here’s a real-life example
-
-
Why not create your own plugin instead?
-
@OT I probably will at some point. This was really for quickness to assist a Sudonix user.
-
This does work well. One behavior is that sometimes it will show the link embeded multiple times, then it clears back to singular when you refresh the page.
-
@OT Yes, I noticed the same thing and will fix that in due course. I also looked at creating a plugin, which I will also address when I have time.
-
As usual : very good work my friends
I’m going on vacation for a week so I’ll try this later -
Tested.
It seem embed is on a blockquote.
I play with this classblockquote.content.twitter-tweet
for better résult (transparency of blockquote)I notice it seems the beginning of URL appears (https://)
Result int the screenshot :
cya
-
@DownPW strange. I’m not able to replicate these specific issues. Can you provide me with the url of the tweet in a PM so I can test?
Thanks
-
great work thank you Mark.
-
This is how it shows up for us. Just have the random dupes of the same tweet. Of course, users are complaining of seeing a tweet repeat three times, but they quickly forgot that a tweet was just showing the X.com using Iframely or any other plugin.
-
@OT can you post the actual tweet url ?
-
I’ve had it where a tweet will show twice but once the page has been refreshed it’ll show the one again.
-
Updated code to address the duplicate tweet issue
https://github.com/phenomlab/nodebb-twitter-embeds/blob/main/embeds.js
-
@phenomlab That is awesome, great job!
Related Topics
-
-
-
-
-
-
-
[NODEBB] Stats
Unsolved Customisation -