How to Integrate Twitter with SharePoint to Get Twitter Feeds?

Although there are Twitter-SharePoint web parts in CodePlex, we can integrate Twitter with SharePoint with Out-of-the-box script editor/content editor web parts in a few steps.

Simply, follow these steps for adding twitter to SharePoint to get twitter feeds.

Step 1: Go to https://www.twitter.com and Log-in to your Twitter account.(You need to have a Twitter account!)

Step 2: Navigate to https://publish.twitter.com/

twitter feed web part sharepoint 2013

Step 3: In the widgets tab, Click on “Create New” button

twitter feed in sharepoint 2013

Step 4:  Under the “User Timeline” tab, click on the “Create Widget” button to generate Twitter embed code. You can further customize the look and feel by following developer API references.

twitter sharepoint 2010 web part

Step 5: Wait for the “Your Widget has been created.” Message from twitter. Now Copy the twitter embed code to clipboard

twitter and sharepoint integration

Here is my twitter widget script generated:

<a class="twitter-timeline"  href="https://twitter.com/SharePointDiary"  data-widget-id="489002092749549570">Tweets by @SharePointDiary</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
</script>

Step 6: Navigate to your SharePoint site. Add a content Editor web part wherever required (Edit Page >> Add Web Part). Paste the code copied from twitter into Content Editor’s Insert >>Embedded Code, Save and close! This will display twitter feeds in SharePoint sites.

Here is the end Result of Twitter SharePoint integration:
twitter integration sharepoint 2013

The above method works on SharePoint 2007, SharePoint 2010 and even in SharePoint 2013! compared with methods to show twitter RSS feed using XML Web parts, XSL in SharePoint, I consider the above method is relatively simple!

adding twitter to sharepoint 2007

Update: In SharePoint 2013, when the “Minimal download strategy” feature is enabled, I see the Twitter feeds are not rendering, instead it displays “Tweets by User”!

Solution: Either disable MDS feature or place the twitter code in a html file, save it in a library, display it in the page with Page viewer web part or with the help of “<iframe>” in CEWP!

Salaudeen Rajack

Salaudeen Rajack is a SharePoint Architect with Two decades of SharePoint Experience. He loves sharing his knowledge and experiences with the SharePoint community, through his real-world articles!

20 thoughts on “How to Integrate Twitter with SharePoint to Get Twitter Feeds?

  • June 19, 2018 at 12:21 AM

    Just saw that I commented 2 years ago. Now my twitter feed that I created back then has just stopped displaying. All I get is “A twitter list by @innovKelli”. I re-created it and the results are the same. I don’t know what changed, it just stopped displaying. I checked to see if MDS was enabled, but it’s not. We are on IE 11.

    Reply
    • July 23, 2018 at 7:39 PM

      Apparently Twitter is deactivating the Twitter Widget
      “We’d like to notify you of some important changes to the Twitter API platform that are coming up, and to help you understand what it means.

      We have postponed the retirement date of Site Streams, User Streams, and legacy Direct Message endpoints, giving developers more time to use the Account Activity API and complete their migration. These services and endpoints will now be deprecated on Thursday, August 16, 2018.”

      Reply
  • May 17, 2018 at 10:31 AM

    Thank you for posting this Salaudeen. But its not supporting on IE10. Could you please assist on this.

    Reply
  • January 8, 2018 at 4:36 PM

    How do I restrict the number of tweets to display on the webpart?

    Reply
  • September 1, 2016 at 8:11 PM

    Your update at the end of the article was invaluable. Thank you!!

    Reply
  • February 2, 2016 at 11:40 AM

    Is it possible to save the twitter tweets inside a sharepoint list ?

    Reply
  • November 23, 2015 at 11:20 AM

    Tried saving twitter code in html file and displaying it through Content Editor Web part – doesn’t work either.

    Reply
  • October 9, 2015 at 8:49 PM

    When I do this and save the page, this is what displays: tweets by @chconkl

    as a link. what am I doing wrong?

    Reply
    • October 10, 2015 at 8:34 AM

      “Minimal download strategy” feature is enabled ? Either disable MDS feature or place the twitter code in a html file, save it in a library, display it in the page with Page viewer web part or with the help of “iframe” in CEWP!

      Reply
  • August 5, 2015 at 11:56 PM

    Thanks for the tip.
    The twitter tool makes you enter a height in pixels. Is there any way to set the height as a % so it adjusts itself to the size of the web part (and you don’t an ugly extra scroll bar)?

    Reply
  • April 28, 2015 at 3:45 PM

    Thank you for posting this Salaudeen. I’ve been unable to get this to work on two different SP 2010 servers. When I paste the embed widget code into the source editor of the Content Editor web part I get a message that says “cannot retrieve properties at this time.” and that it cannot save changes. Any idea what the problem might be? I can send you my widget code.

    Thanks,
    Monica
    [email protected]

    Reply
  • April 2, 2015 at 3:39 PM

    When you create a Widget in Ywitter, click the Search Tab before clicking Create Widget. Otherwise you will just get the @username link.

    Reply
  • February 4, 2015 at 4:07 PM

    We had this working for a year or so, but now it just says “Tweet by @username”. Is there an IE11 tweak to get it working again?

    Reply
  • January 30, 2015 at 5:41 AM

    All i see is tweet by @username, is there something i am missing, these steps are too simple for anything to go wrong! any suggestions!

    Reply
  • January 21, 2015 at 11:42 AM

    No working for me as well “Tweet by @username “

    Reply
  • November 17, 2014 at 5:03 PM

    Not working for me on SharePoint online 2013

    Reply
  • November 17, 2014 at 5:20 PM

    worked when ‘minimal download strategy’ feature is turned off

    Reply
  • July 17, 2014 at 12:24 PM

    Lovelyyyyyyyyyyy

    Reply
  • July 16, 2014 at 12:02 PM

    I didn’t know this. This is fantastic. I’m going onto twitter now to do this. Thanks for sharing this SharePoint tip and for the step by step

    Reply

Leave a Reply