In this article, we will present how we built a simple twitter feed in Drupal 8 with custom block and without any custom module. This block will display a list of tweets pulled from a custom list as in the example shown in the side bar.
As a prerequisite, you need to have a twitter account and a custom list in your feeds.
1) Get code from "twitter publish"
First, we need to get the code that is generated by twitter publishing api.
On this page, enter the needed url for the list of tweets you want to display as in the example below:
The code will be generated from the url and you can add some custom format:
Once you have updated your options, you can just coy the custom code:
We will use this code to create the block.
2) Custom block
In custom block library (/admin/structure/block/block-content), click on "+ Add custom block" button.
In the custom block body (full HTML), copy the code generated previously in "<> source" mode and click save:
You now have a custom block that you can place anywhere in your site. To do so go to /admin/structure/block and click on the "Place block" button where you want to display your block.
The result :
For more advance block creation, see also this article.