CreateMyBB Support Forums

Full Version: Embedding Twitter and FB to site
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Paste this code directly into the HTML portion of your site, and you'll be good to go. Need more info? Check out our developer docs.

I got the above message to add the code from twitter to my site.  I want to allow people to embed twitter.   I can't find where to add this code in my admin configuration.  Been looking and looking to how to add this.  Any help is great appreciated.  I've added the plugins for FB and twitter log on and trying to get the codes and keys for those as well.  Do I need the codes and keys if I add this code to HTML?  Thank you for the help.  I understand there is way to embed twitter posts and also log on using twitter, FB, which is separate.
I am not seeing the code posted above?

You can insert code directly into the templates.

Facebook should auto-embed in most most url formats
<blockquote class="twitter-tweet"><p lang="en" dir="ltr">US Created Slavery <a href="https://t.co/sjxIYvLR2G">https://t.co/sjxIYvLR2G</a></p>&mdash; Teresa Scott (@teresascott0355) <a href="https://twitter.com/teresascott0355/status/1274745382753402881?ref_src=twsrc%5Etfw">June 21, 2020</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

Here is the code I got.   What I'm trying to do is allow twitter to be embedded into my site when a poster wants to show a tweet from twitter.
Embedding twitter is not easy to do automatically.

This part of the code
Code:
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
Needs to be in the headers of your site in the <head> section in the mybb header template I believe.
(06-21-2020, 05:00 PM)Jon Wrote: [ -> ]Embedding twitter is not easy to do automatically.

This part of the code
Code:
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
Needs to be in the headers of your site in the <head> section in the mybb header template I believe.
So I just copy the above and add this to the template set and save edit?
Yes that should do it
Anytime you post though you have to use html and include the entire embed minus the <script> tag
(06-21-2020, 05:06 PM)Jon Wrote: [ -> ]Yes that should do it
Anytime you post though you have to use html and include the entire embed minus the <script> tag
So, posters copy URL twitter, post as reply, and it'll show up from twitter as embedded?  This works for every poster?
No, they have to copy the embed html without
Code:
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
(06-21-2020, 05:12 PM)Jon Wrote: [ -> ]No, they have to copy the embed html without
Code:
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
Thanks.  Where do you find the embed html to copy from twitter?
I inserted the code into the template.   But I can't seem to find how to make this work for posters to embed twitter or find the HTML to make it work.  Apologies for my lack of knowledge here.  I'm googling and reading to learn this to make this as good as I can for the posters who have requested to be able to post or embed twitter content.  Thanks.
Pages: 1 2