Page 1 of 1

embed Twitter?

Posted: Wed Jul 20, 2016 8:24 am
by frankmanl
Twitter provides a widget to embed a profile, but when I add it to my CMSMS site I only get a link to the Twitter account, not the tweets themselves.
I use this code in an GCB / template and put it all within {literal}-tags

Code: Select all

<a class="twitter-timeline" href="https://twitter.com/desiredaccount">Tweets by desiredaccount</a> <__script__ async src="//platform.twitter.com/widgets.js" charset="utf-8"></__script>
Is there a simple way to embed Twitter in a CMSMS site?
There are some (stale) tags to do so, and CGTweet is advised, but that also needs installation of CGExtensions, FrontEndUsers and CGSimpleSmarty. That seems to be a bit over the top for a simple embed.

Frank

Re: embed Twitter?

Posted: Wed Jul 20, 2016 10:11 am
by scooper
My slightly unhelpful answer is that that yep - that should work. We've got a couple of sites where we just embed a Twitter widget and just using

Code: Select all

<a class="twitter-timeline" href="https://twitter.com/millipedia">Tweets by millipedia</a> <__script async src="//platform.twitter.com/widgets.js" charset="utf-8"></__script__>
works for me even without literal tags. (I first tried your 'desiredaccount' code thinking that was your twitter name - someone should grab that.)

One thing that sometimes catches me is tracking protection in Firefox. If you have that enabled by default then the embed code doesn't work and will just show a link. Make sure your ad block / privacy plugins aren't blocking Twitter as well.

If you use the wysiwyg editor on your gcb then it will strip your script tags so make sure that's turned off as well.

Re: embed Twitter?

Posted: Wed Jul 20, 2016 10:20 am
by frankmanl
Slightly unhelpful? You solved it for me!
It's Firefox's tracking protection that is the culprit - in IE the site looks fine.
Ooohw, there 's always so much that can go wrong ...
Thanks, Scooper.