Hello friends, I am Oleg Rights. Today I want to share my experience setting up a blog for the most effective way to share a record on Twitter. I tell you how to place a meta tags on your website or blog, allowing you to display a summary card in your Tweets.
Twitter provides the possibility of extended tweets – these are optimized Tweets with Cards.
When I installed a Twitter button on my blog, I noticed that after clicking on Twitter, only a short recording without a picture leaves.
However, this is not exactly what I would like – there is too little information for my follovers. This is not very good for promotion in social networks. I like it more when there is full information on Twitter – extended Tweet:
This Tweet is called Twitter card. How to do it? It’s very simple
Activate Open Graph tags
Twitter uses special markup for building Twitter Card.
Table 1. Open Graph tags for Twitter
Card Property | Description |
twitter:card | The card type, which will be one of “summary”, “summary_large_image”, “app”, or “player” |
twitter:site | @username for the website used in the card footer |
twitter:creator | @username for the content creator / author |
og:title | The title of the post |
og:description | Description of the post |
og:image | Permalink of the image |
To have an optimized Tweet appear in the news feed, you need to include social Open Graph tags on your blog or website. How to do it? There are 2 ways: using a plugin or editing the code yourself. The easiest way is to enable the setting of social meta in the SEO plugin. I use the All in One SEO plugin and the inclusion of Open Graph tags is very easy in it.
To enable the Open Graph tags, go to the WordPress admin panel and select the following path:
«All in One SEO» >> «Feature Manager», where we activate the Social Meta.
New tab «Social Meta» will appear after activation:
Here you need to set up a little.
Image settings
Here you need to choose which image of the post will be sent to Twitter Card:
Here you can choose:
- First attached image
- Default image
- Featured image
- First image in content
- Post author image
- Image from custom field
- First Available image
I chose the First attached image setting, but you can choose any option as you like.
Twitter settings
In this field you can configure:
- type of Twitter Card
- the Twitter username associated with your website
- Show Twitter Author
- the name of your website
The most important setting – Select the default type of Twitter Card to display:
- Summary
- Summary Large Image
To check how your post will look on Twitter, you can use the Validator Twitter Cards
Open Twitterbot access to images
Sometimes even after checking in the validator, the post on Twitter still does not have an optimized look. What to do with it problem? This works when Twitter’s crawler can not scan your images. To fix this, you need to open your images to index Twitterbot.
It’s very easy to do this. You need to allow access to the image folder for Twitterbot in the robots.txt file:
User-agent: Twitterbot
Disallow: *
Allow: /images
If your site has standard WordPress settings, then the images are stored in the / wp-content / uploads / folder and the code for Twitterbot in the robots.txt file will be:
User-agent: Twitterbot
Disallow: *
Allow: /wp-content/uploads/
Another way is that you can access the Twitterbot for all site folders in the robots.txt file:
User-agent: Twitterbot
Disallow:
But the latter method is worse, since the bot Twitter your server can heavily load the scan. It can badly affect the work of the site.
That is good!