How do I show a Twitter widget in my website without IFrame? SEO agency wants to have indexable tweets on the page!


I am a developer working on a project together with an SEO agency. For 2 reasons it has been decided that a twitter widget needs to be presented on the new landing pages:

  1. To support the social media strategy
  2. To have continuously fresh content on the landing page

The reason why they want to have continuously fresh content on the page is for the Google Crawlers: they need to index updated content every time they crawl the page. By having continuously updated tweets in the indexable code it would help to the page freshness.

This post is not argue whether this actually helps for SEO or not, it’s a discussion I will never win from the agency who says it does help.

I understand the requirement, but I am a bit stuck here. The default Twitter Widget is an iFrame solution, so the content cannot be crawled on the landing page where it is presented.

Instead, I have been looking at the Twitter API. Using the API I seem not to be able to replicate the Twitter iFrame solution/features.

Currently I have found examples to get the list of tweets and then linking the hashtags and mention tags.
I got the Oauth setup working and got the list of tweets to show and link back to the twitter handle or status.

I need to replicate the following things as similar to the twitter iFrame solution:

Write Feature to twitter handle:
• Follow @myaccount on twitter (Follow button)
• Retweet
• Favourite
• Reply

Read feature:
• Image pull
• show/hide summary
• live feed (new tweets) pull.

Is there an example that you can redirect me to or the parts of the api where the above mentioned features are explained.

Please help and let me know if this is the way to go or if you have any other suggestions.


Hi Sworup,

Within the UI, you can use the Follow Button widget, and check out the documentation on Web Intents for how to invoke Tweet Actions. pic.twitter images are present in the entities of the Tweet response, but there’s no consumption API for third-party content via Cards I’m afraid, so if you want other image providers, video or summaries in your renderings you’ll need to write your own support via the content URLs or a service such as Embedly.

Hope that helps,