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/
Step 3: In the widgets tab, Click on the “Create New” button
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.
Step 5: Wait for the “Your Widget has been created.” Message from Twitter. Now copy the twitter embed code to the clipboard.
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=/^https:/.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 Result of Twitter SharePoint integration:
The above method works on SharePoint 2007, SharePoint 2010 and even in 2013! Compared with other ways to show twitter RSS feed using XML Web parts, XSL in SharePoint, I consider the above method is relatively simple!
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 the MDS feature or place the twitter code in an HTML file, save it in a library, display it on the page with Page viewer web part or with the help of “<iframe>” in CEWP!
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.
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.”
Thank you for posting this Salaudeen. But its not supporting on IE10. Could you please assist on this.
How do I restrict the number of tweets to display on the webpart?
Your update at the end of the article was invaluable. Thank you!!
Is it possible to save the twitter tweets inside a sharepoint list ?
Tried saving twitter code in html file and displaying it through Content Editor Web part – doesn’t work either.
When I do this and save the page, this is what displays: tweets by @chconkl
as a link. what am I doing wrong?
“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!
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)?
Thanks!
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]
When you create a Widget in Ywitter, click the Search Tab before clicking Create Widget. Otherwise you will just get the @username link.
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?
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!
No working for me as well “Tweet by @username “
Not working for me on SharePoint Online 2013
worked when ‘minimal download strategy’ feature is turned off
Lovelyyyyyyyyyyy
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