{"id":714,"date":"2010-04-20T08:07:39","date_gmt":"2010-04-20T08:07:39","guid":{"rendered":"http:\/\/andyparkes.co.uk\/blog\/?p=714"},"modified":"2010-04-20T09:11:26","modified_gmt":"2010-04-20T09:11:26","slug":"sharepoint-as-a-twitter-client-sort-of-part-one","status":"publish","type":"post","link":"https:\/\/andyparkes.co.uk\/blog\/index.php\/2010\/04\/20\/sharepoint-as-a-twitter-client-sort-of-part-one\/","title":{"rendered":"SharePoint as a Twitter Client. Sort of &ndash; Part One"},"content":{"rendered":"<p>This is going to be quite lengthy so I\u2019ll split into a couple of posts.<\/p>\n<p>Back in March, Mark Wilson of <a href=\"http:\/\/www.markwilson.co.uk\/\">MarkWilson.co.uk<\/a> (if you\u2019re not reading his blog\u2026.go check it out now!) asked the following on Twitter.<\/p>\n<blockquote>\n<p><a href=\"http:\/\/twitter.com\/markwilsonit\/status\/10365398953http:\/\/twitter.com\/markwilsonit\/status\/10365398953\" class=\"broken_link\">Does anyone know how to read XML (i.e. Twitter updates) into a SharePoint List (not the XML webpart reading it dynamically)?<\/a><\/p>\n<\/blockquote>\n<p>Since I like a challenge I decided to take a look at it.<\/p>\n<p>If you search (using your favourite search engine) for Twitter and SharePoint you\u2019ll find one of two things.<\/p>\n<p>Either, examples of how to use a webpart to grab the RSS feed of someone\u2019s Twitter status or people creating a Twitter-like application using SharePoint (which is pretty cool anyway).<\/p>\n<p>What Mark was looking for was something slightly different.<\/p>\n<p>He wanted to collect posts from a specific user into a SharePoint list. In effect creating an archive that a team could view. They could even use SharePoint to create views to look for keywords.<\/p>\n<p>This meant the webpart wouldn\u2019t do as it only shows a snapshot of the current status updates. If the particular user tweets quite a lot you could miss stuff.<\/p>\n<p>Mark initially pointed me in the direction of the RSS feeds for each user (<a href=\"http:\/\/twitter.com\/statuses\/user_timeline\/39236354.rss\" class=\"broken_link\">here&#8217;s mine<\/a>) but this gives us a similar problem to the webpart as it only shows the last 20 tweets.<\/p>\n<p>This was when I stepped out of my comfort zone and started looking at the <a href=\"http:\/\/apiwiki.twitter.com\/Twitter-API-Documentation\" class=\"broken_link\">Twitter API<\/a>&#160;<\/p>\n<p>It turns out the Twitter API isn\u2019t actually very complicated. All you need to do is craft a URL to pass certain parameters and it\u2019ll throw some XML back at you.<\/p>\n<p>For example,<\/p>\n<p>This url will retrieve an XML file containing my last five tweets. <\/p>\n<p><a href=\"http:\/\/api.twitter.com\/1\/statuses\/user_timeline.xml?screen_name=AndyParkes&amp;count=5\" class=\"broken_link\">http:\/\/api.twitter.com\/1\/statuses\/user_timeline.xml?screen_name=AndyParkes&amp;count=5<\/a> (you can click this even if you don\u2019t have a Twitter account. Authentication is only needed for protected accounts)<\/p>\n<p>So I\u2019d now found a way of grabbing the tweets\u2026but how to get them into a SharePoint list?<\/p>\n<p><strong>IF<\/strong> I were a SharePoint developer armed with a copy of Visual Studio I actually don\u2019t think this would be all that difficult to do. (you\u2019ll see why in one of the later parts to this post)<\/p>\n<p>However, since I\u2019m not I need to make use of the tools at my disposal.<\/p>\n<p>I had to think of something that can make use of XML but also talk to SharePoint and the answer is\u2026.<\/p>\n<p><strong>Microsoft Access <\/strong><\/p>\n<p>Yep..seriously.<\/p>\n<p>Access has the ability to import XML files into a table.<\/p>\n<p>Access also has the ability to link to a SharePoint list and update it.<\/p>\n<p>By putting these two bits of functionality together I was actually able to reach the desired effect.<\/p>\n<p>You can try it yourself.<\/p>\n<p>Open Access and create a new blank database.<\/p>\n<p>Click the External Data tab and choose XML file.<\/p>\n<p><a href=\"https:\/\/andyparkes.co.uk\/blog\/wp-content\/uploads\/2010\/04\/image14.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px\" title=\"image\" border=\"0\" alt=\"image\" align=\"left\" src=\"https:\/\/andyparkes.co.uk\/blog\/wp-content\/uploads\/2010\/04\/image_thumb14.png\" width=\"304\" height=\"106\" \/><\/a> <\/p>\n<p> Access  <\/p>\n<p>&#160;<\/p>\n<p>TaDa!\u2026\u2026well not quite.<\/p>\n<p>Currently it\u2019s not very dynamic.<\/p>\n<p>All it does is fetch the last 20 updates. If you re-ran the process above again you\u2019d run into problems doing the SharePoint export as the status table already exists you\u2019d end up with multiple lists (eg. status, status_1, status,2)<\/p>\n<p>Also it\u2019s not smart enough to realise that if we already have some tweets in the database we don\u2019t want to re-add those. If you followed the procedure above for a second time you\u2019d also end up with duplicate tweets.<\/p>\n<p>Finally if you tried to put them into chronological order you may notice the sort doesn\u2019t quite work under certain circumstances.<\/p>\n<p>\n<\/p>\n<\/p>\n<\/p>\n<\/p>\n<\/p>\n<\/p>\n<p>So in the next part we\u2019ll put Access to work to make this a bit more intelligent and finally automate the whole thing so it\u2019ll fetch the tweets all by itself!<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is going to be quite lengthy so I\u2019ll split into a couple of posts. Back in March, Mark Wilson of MarkWilson.co.uk (if you\u2019re not reading his blog\u2026.go check it out now!) asked the following on Twitter. Does anyone know how to read XML (i.e. Twitter updates) into a SharePoint List (not the XML webpart<\/p>\n<p><a class=\"readmore\" href=\"https:\/\/andyparkes.co.uk\/blog\/index.php\/2010\/04\/20\/sharepoint-as-a-twitter-client-sort-of-part-one\/\"><span class=\"arrow-right icon\"><\/span>Read More<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[105,45,87],"tags":[],"class_list":["post-714","post","type-post","status-publish","format-standard","hentry","category-access","category-sharepoint","category-twitter"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.11 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>SharePoint as a Twitter Client. Sort of &ndash; Part One - Andy&#039;s Techie Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/andyparkes.co.uk\/blog\/index.php\/2010\/04\/20\/sharepoint-as-a-twitter-client-sort-of-part-one\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SharePoint as a Twitter Client. Sort of &ndash; Part One - Andy&#039;s Techie Blog\" \/>\n<meta property=\"og:description\" content=\"This is going to be quite lengthy so I\u2019ll split into a couple of posts. Back in March, Mark Wilson of MarkWilson.co.uk (if you\u2019re not reading his blog\u2026.go check it out now!) asked the following on Twitter. Does anyone know how to read XML (i.e. Twitter updates) into a SharePoint List (not the XML webpartRead More\" \/>\n<meta property=\"og:url\" content=\"https:\/\/andyparkes.co.uk\/blog\/index.php\/2010\/04\/20\/sharepoint-as-a-twitter-client-sort-of-part-one\/\" \/>\n<meta property=\"og:site_name\" content=\"Andy&#039;s Techie Blog\" \/>\n<meta property=\"article:published_time\" content=\"2010-04-20T08:07:39+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2010-04-20T09:11:26+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/andyparkes.co.uk\/blog\/wp-content\/uploads\/2010\/04\/image_thumb14.png\" \/>\n<meta name=\"author\" content=\"Andy Parkes\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Andy Parkes\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/andyparkes.co.uk\/blog\/index.php\/2010\/04\/20\/sharepoint-as-a-twitter-client-sort-of-part-one\/\",\"url\":\"https:\/\/andyparkes.co.uk\/blog\/index.php\/2010\/04\/20\/sharepoint-as-a-twitter-client-sort-of-part-one\/\",\"name\":\"SharePoint as a Twitter Client. Sort of &ndash; Part One - Andy&#039;s Techie Blog\",\"isPartOf\":{\"@id\":\"https:\/\/andyparkes.co.uk\/blog\/#website\"},\"datePublished\":\"2010-04-20T08:07:39+00:00\",\"dateModified\":\"2010-04-20T09:11:26+00:00\",\"author\":{\"@id\":\"https:\/\/andyparkes.co.uk\/blog\/#\/schema\/person\/3534e8ac6b1bec765cd061feff56679d\"},\"breadcrumb\":{\"@id\":\"https:\/\/andyparkes.co.uk\/blog\/index.php\/2010\/04\/20\/sharepoint-as-a-twitter-client-sort-of-part-one\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/andyparkes.co.uk\/blog\/index.php\/2010\/04\/20\/sharepoint-as-a-twitter-client-sort-of-part-one\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/andyparkes.co.uk\/blog\/index.php\/2010\/04\/20\/sharepoint-as-a-twitter-client-sort-of-part-one\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/andyparkes.co.uk\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SharePoint as a Twitter Client. Sort of &ndash; Part One\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/andyparkes.co.uk\/blog\/#website\",\"url\":\"https:\/\/andyparkes.co.uk\/blog\/\",\"name\":\"Andy&#039;s Techie Blog\",\"description\":\"Professional Geek\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/andyparkes.co.uk\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/andyparkes.co.uk\/blog\/#\/schema\/person\/3534e8ac6b1bec765cd061feff56679d\",\"name\":\"Andy Parkes\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/andyparkes.co.uk\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/3824cbf53df51d7ca5cf809b6ad81a157fbfff2292e36ab8666f04ddad06bfcc?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/3824cbf53df51d7ca5cf809b6ad81a157fbfff2292e36ab8666f04ddad06bfcc?s=96&d=mm&r=g\",\"caption\":\"Andy Parkes\"},\"description\":\"Andy Parkes is Technical Director at Coventry based IT support company IBIT Solutions. Formerly, coordinator of AMITPRO and Microsoft Partner Area Lead for 2012-2013. He also isn't a fan of describing himself in the third person.\",\"sameAs\":[\"http:\/\/www.andyparkes.co.uk\/blog\"],\"url\":\"https:\/\/andyparkes.co.uk\/blog\/index.php\/author\/andyparkes\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"SharePoint as a Twitter Client. Sort of &ndash; Part One - Andy&#039;s Techie Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/andyparkes.co.uk\/blog\/index.php\/2010\/04\/20\/sharepoint-as-a-twitter-client-sort-of-part-one\/","og_locale":"en_US","og_type":"article","og_title":"SharePoint as a Twitter Client. Sort of &ndash; Part One - Andy&#039;s Techie Blog","og_description":"This is going to be quite lengthy so I\u2019ll split into a couple of posts. Back in March, Mark Wilson of MarkWilson.co.uk (if you\u2019re not reading his blog\u2026.go check it out now!) asked the following on Twitter. Does anyone know how to read XML (i.e. Twitter updates) into a SharePoint List (not the XML webpartRead More","og_url":"https:\/\/andyparkes.co.uk\/blog\/index.php\/2010\/04\/20\/sharepoint-as-a-twitter-client-sort-of-part-one\/","og_site_name":"Andy&#039;s Techie Blog","article_published_time":"2010-04-20T08:07:39+00:00","article_modified_time":"2010-04-20T09:11:26+00:00","og_image":[{"url":"https:\/\/andyparkes.co.uk\/blog\/wp-content\/uploads\/2010\/04\/image_thumb14.png"}],"author":"Andy Parkes","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Andy Parkes","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/andyparkes.co.uk\/blog\/index.php\/2010\/04\/20\/sharepoint-as-a-twitter-client-sort-of-part-one\/","url":"https:\/\/andyparkes.co.uk\/blog\/index.php\/2010\/04\/20\/sharepoint-as-a-twitter-client-sort-of-part-one\/","name":"SharePoint as a Twitter Client. Sort of &ndash; Part One - Andy&#039;s Techie Blog","isPartOf":{"@id":"https:\/\/andyparkes.co.uk\/blog\/#website"},"datePublished":"2010-04-20T08:07:39+00:00","dateModified":"2010-04-20T09:11:26+00:00","author":{"@id":"https:\/\/andyparkes.co.uk\/blog\/#\/schema\/person\/3534e8ac6b1bec765cd061feff56679d"},"breadcrumb":{"@id":"https:\/\/andyparkes.co.uk\/blog\/index.php\/2010\/04\/20\/sharepoint-as-a-twitter-client-sort-of-part-one\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/andyparkes.co.uk\/blog\/index.php\/2010\/04\/20\/sharepoint-as-a-twitter-client-sort-of-part-one\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/andyparkes.co.uk\/blog\/index.php\/2010\/04\/20\/sharepoint-as-a-twitter-client-sort-of-part-one\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/andyparkes.co.uk\/blog\/"},{"@type":"ListItem","position":2,"name":"SharePoint as a Twitter Client. Sort of &ndash; Part One"}]},{"@type":"WebSite","@id":"https:\/\/andyparkes.co.uk\/blog\/#website","url":"https:\/\/andyparkes.co.uk\/blog\/","name":"Andy&#039;s Techie Blog","description":"Professional Geek","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/andyparkes.co.uk\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/andyparkes.co.uk\/blog\/#\/schema\/person\/3534e8ac6b1bec765cd061feff56679d","name":"Andy Parkes","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/andyparkes.co.uk\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/3824cbf53df51d7ca5cf809b6ad81a157fbfff2292e36ab8666f04ddad06bfcc?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3824cbf53df51d7ca5cf809b6ad81a157fbfff2292e36ab8666f04ddad06bfcc?s=96&d=mm&r=g","caption":"Andy Parkes"},"description":"Andy Parkes is Technical Director at Coventry based IT support company IBIT Solutions. Formerly, coordinator of AMITPRO and Microsoft Partner Area Lead for 2012-2013. He also isn't a fan of describing himself in the third person.","sameAs":["http:\/\/www.andyparkes.co.uk\/blog"],"url":"https:\/\/andyparkes.co.uk\/blog\/index.php\/author\/andyparkes\/"}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pmvJ6-bw","jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/andyparkes.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/posts\/714","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/andyparkes.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/andyparkes.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/andyparkes.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/andyparkes.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=714"}],"version-history":[{"count":1,"href":"https:\/\/andyparkes.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/posts\/714\/revisions"}],"predecessor-version":[{"id":739,"href":"https:\/\/andyparkes.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/posts\/714\/revisions\/739"}],"wp:attachment":[{"href":"https:\/\/andyparkes.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=714"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/andyparkes.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=714"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/andyparkes.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=714"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}