HOME ABOUT
I AM HERE
Bookmark and Share

Twitter SharePoint web part

February 4, 2009 08:30 by Aidan

I thought I would have a go at creating a web part to display a Twitter public timeline within SharePoint. The reason for creating this web part is so that it can be used by project teams that are spread over several offices/countries to stay in touch and feel more connected without having to invest a lot of time emailing each other or talking on the phone. Twitter is ideal for this kind of light weight communication as it restricts the user to sending short, to the point messages.

Before starting I had a quick look on the web to see if I was reinventing the wheel. Michael Gannotti suggests this solution using javascript and the CEWP but I wanted something that we would have a little more control over in terms of html markup and branding and that wasn't limited to the CEWP being available. I also wanted to have the possibility of extending the web part to include other functionality in the future such as not just being able to display tweets but to also send them.

The web part is configurable using two custom attributes - username and password. This allows you to display any users public timeline assuming you have the password. To set it up for use with a project team public timeline you should create a Twitter account for the project and then follow the members of the team to see a timeline that displays tweets from each of the members. 

At the bottom of this post there are links to the .wsp file which can be deployed to SharePoint using stsadm.exe and a .css file so that you can see how I chose to style the web part but obviously you could brand it any way you want.

**Update by request - more detail on deploying solutions

My solution uses Twitterlib.dll which is an open source .Net wrapper for the Twitter API and was created by the developers at Witty. This is a link to the Witty project on Google code. 

Download the wsp for the Twitter web part: TwitterPublicTimeline.wsp (24 kb)

For a styling suggestion try this css: twitter.css (302.00 bytes)


Comments

February 11. 2009 01:44

Any chance you could display some screen shots?

Brad

February 17. 2009 17:41

Brad - Mirjam who worked on this with me has a screenshot of the first version on her blog here - www.sharepointu.com/.../...art-for-sharepoint.aspx
The current version displays links in tweets and screen names link to the relevant user page on twitter.

aidan

March 5. 2009 18:36

I was inspired by the SharePoint - Twitter connection, and have put together a SharePoint Twitter Search Webpart, that is available for download on my blog:

www.mattjimison.com/.../

The webpart doesn't require credentials, and has search features that let you view by keywords, from user, to user, about user, hashtag, and querystring.


Cheers!

Matt Jimison

March 20. 2009 16:10

I could use some help...  for all users except Admins I get "Access to the path 'Witty' is denied." What am I missing?

Thanks,

Andy Casper

April 28. 2009 09:18

Try downloading this project and using the wsp from here instead -
cid-0ce4337df947b74a.skydrive.live.com/.../Twitter%20Web%20Part/TwitterPublicTimeline%7C5new%7C6.zip

Aidan

May 6. 2009 20:47

when I add the webpart i'm getting an error Object reference not set to an instance of an object. Can you help?

Joe

May 18. 2009 23:07

Hi Aidan,

just tried installing it and got:
"Unable to add selected web part(s).
Twidder Public Timeline: The file you imported is not valid. Verify that the file is a Web Part description file (*.webpart or *.dwp) and that it contains well-formed XML."

I also tried grabbing the copy of your SkyDrive, but you don't appear to be sharing it any more.

Any ideas?

Thanks
Craig

Craig

May 18. 2009 23:20

I'm a moron, so used to just uploading .webparts, didn't even register that it was a .wsp... Smile

Craig

May 29. 2009 20:13

Does this webpart work with a secure site, ie https?  I'm getting the same access to path 'Witty' is denied.

Eric

June 1. 2009 19:34

I am new to Sharepoint. If it is a .wsp, what do you need to do to get it to work?

Chris Evelo

June 5. 2009 18:51

I've installed the Web part with no problems, but when I add it to the page I get the following error: "Access to the path 'Witty' is denied." Any suggestions?

Lallo

October 30. 2009 08:36

It gives Unable to connect to remote server..
Can you help its urgent..!!

Yogesh

November 28. 2009 11:17

Yogesh - this is most likely because you are running the web part behind a firewall that does not allow access to Twitter.

Aidan

December 17. 2009 03:55

Hi,
Does this web part work on Sharepoint 2003??

Anita

December 31. 2009 10:47

Just used this, and it's excellent! thanks a million... one note on the Witty error... i've found that using this for annouymous users pulls back this error.  When users are logged into sharepoint it pulls back normally...

I'm running this on Sharepoint 2010 beta, and it works fine - when the users are logged in of course...;)..  To tidy things up i've audience targeted the web part so only authenticated users see the feed.

Not to be captain if state the obvious or anything but when you deply it in sp2010 the stsadm command ahs to be run from the 14 hive and not the 12 hive...

Heath

January 5. 2010 00:28

Pingback from vspug.com

Mirjam's blog » Twitter web part for SharePoint

vspug.com

January 26. 2010 15:08

Would you be willing to share the source code with me? I'm interested in learning more about programming SharePoint and this project offers some great examples, but the source code would help me to fully understand the development and deployment of SP.

Robbert

January 26. 2010 21:59

Robbert - I have emailed you the source code.

Aidan

Add comment




  Country flag

biuquote
  • Comment
  • Preview
Loading