{"id":759,"date":"2010-05-14T20:00:35","date_gmt":"2010-05-14T20:00:35","guid":{"rendered":"http:\/\/andyparkes.co.uk\/blog\/?p=759"},"modified":"2010-05-14T20:54:16","modified_gmt":"2010-05-14T20:54:16","slug":"sharepoint-as-a-twitter-client-sort-of-part-four","status":"publish","type":"post","link":"https:\/\/andyparkes.co.uk\/blog\/index.php\/2010\/05\/14\/sharepoint-as-a-twitter-client-sort-of-part-four\/","title":{"rendered":"SharePoint as a Twitter Client. Sort of \u2013 Part Four"},"content":{"rendered":"<p><a href=\"https:\/\/andyparkes.co.uk\/blog\/index.php\/2010\/05\/12\/sharepoint-as-a-twitter-client-sort-of-part-three\/\">In part three<\/a> I said there was bit of functionality left to clear up.<\/p>\n<p><em>We have to run the process manually. <\/em><\/p>\n<p>We actually did a little bit of the ground work in <a href=\"https:\/\/andyparkes.co.uk\/blog\/index.php\/2010\/05\/01\/sharepoint-as-a-twitter-client-sort-of-part-two\/\">part two<\/a>. <\/p>\n<p>One of the pieces of code was the main function that brings all the bits and pieces together \u2013 it was called <strong>\u201cFetch_Tweets\u201d<\/strong><\/p>\n<blockquote>\n<p>Public Function Fetch_Tweets() As String <\/p>\n<p>Dim strID As String      <br \/>Dim strXML As String <\/p>\n<p>If Get_Settings = False Then      <br \/>&#160;&#160;&#160; Debug.Print &quot;Couldn\u2019t get settings&quot;       <br \/>&#160;&#160;&#160; End       <br \/>End If<\/p>\n<p>strID = Get_Last_Tweet_ID      <br \/>strXML = Get_Latest_Tweets(strScreenName, strUserName, strPassword, strID) <\/p>\n<p>SaveTmpXML strXML <\/p>\n<p>Application.ImportXML strTempFile, acAppendData<\/p>\n<p>Tidy_User_table <\/p>\n<p>End Function<\/p>\n<\/blockquote>\n<p>&#160;<\/p>\n<p>Take a look at the first word of this code block. <\/p>\n<p><strong>PUBLIC<\/strong><\/p>\n<p>By adding this we can reference the function outside of Access so I put together a vbscript to run the function. (essentially\u2026programmer types will argue this isn\u2019t what <em>Public<\/em> means but for the layman it\u2019ll do here!)<\/p>\n<blockquote>\n<p>Dim TweetDB      <\/p>\n<p>TweetDB = &quot;C:\\TweetPoint\\Twitter.ACCDB&quot;     <\/p>\n<p>Dim myAccess      <br \/>Set myAccess = CreateObject(&quot;Access.Application&quot;) <\/p>\n<p>myAccess.OpenCurrentDatabase TweetDB, False     <br \/>myAccess.AutomationSecurity = msoAutomationSecurityForceDisable <\/p>\n<p>myAccess.Run(&quot;Fetch_Tweets&quot;) <\/p>\n<p>myAccess.CloseCurrentDatabase     <br \/>myAccess.Quit acQuitSaveNone      <br \/>Set myAccess = Nothing      <\/p>\n<\/blockquote>\n<p>&#160;<\/p>\n<p>So just breaking this down.<\/p>\n<p>The vbscript is essentially doing exactly the same as if you were running this manually.<\/p>\n<p>First we create an instance of Access. (The same as opening the application)<\/p>\n<p>Then we open the database we need.<\/p>\n<p>Then we tell Access to run our \u201cFetch_Tweets\u201d function.<\/p>\n<p>The we close the database and close the application.<\/p>\n<p>Simple!<\/p>\n<p>The only caveat here is macro security. If you have your security in Access set to high or prompt then the vbscript won\u2019t work.<\/p>\n<p>Since I\u2019m just doing this a proof of concept I turned the macro security off. <\/p>\n<p>You\u2019ll need to make your own decision about how to deal with this. <\/p>\n<p>One suggestion though is to look at something called \u201cTrusted Locations\u201d<\/p>\n<p><a href=\"http:\/\/office.microsoft.com\/en-us\/help\/HA100319991033.aspx\">This article explains how to set that up.<\/a><\/p>\n<p>We can then take this vbscript and run it as a scheduled task to run as often as you need.<\/p>\n<p>The major downside to this is that the system that will run the vbscript will need to have Access installed. <\/p>\n<p>I don\u2019t think the Access runtime would be enough (I only tried it very briefly)<\/p>\n<p>So that\u2019s all of our basic functionality problems sorted<\/p>\n<p>We can ask Twitter to return the tweets for a given person, have them displayed in a SharePoint list automatically and it will be intelligent enough to not give us duplicates.<\/p>\n<p>I\u2019ll follow this up with a couple of posts that shows how to add a little more polish and cover a problem that I\u2019ll need to look at going forward. I haven\u2019t figured out what to do about it yet though!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In part three I said there was bit of functionality left to clear up. We have to run the process manually. We actually did a little bit of the ground work in part two. One of the pieces of code was the main function that brings all the bits and pieces together \u2013 it was<\/p>\n<p><a class=\"readmore\" href=\"https:\/\/andyparkes.co.uk\/blog\/index.php\/2010\/05\/14\/sharepoint-as-a-twitter-client-sort-of-part-four\/\"><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_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},"jetpack_post_was_ever_published":false},"categories":[106,45,87],"tags":[],"class_list":["post-759","post","type-post","status-publish","format-standard","hentry","category-access-office","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 \u2013 Part Four - 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\/05\/14\/sharepoint-as-a-twitter-client-sort-of-part-four\/\" \/>\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 \u2013 Part Four - Andy&#039;s Techie Blog\" \/>\n<meta property=\"og:description\" content=\"In part three I said there was bit of functionality left to clear up. We have to run the process manually. We actually did a little bit of the ground work in part two. One of the pieces of code was the main function that brings all the bits and pieces together \u2013 it wasRead More\" \/>\n<meta property=\"og:url\" content=\"https:\/\/andyparkes.co.uk\/blog\/index.php\/2010\/05\/14\/sharepoint-as-a-twitter-client-sort-of-part-four\/\" \/>\n<meta property=\"og:site_name\" content=\"Andy&#039;s Techie Blog\" \/>\n<meta property=\"article:published_time\" content=\"2010-05-14T20:00:35+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2010-05-14T20:54:16+00:00\" \/>\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=\"2 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\/05\/14\/sharepoint-as-a-twitter-client-sort-of-part-four\/\",\"url\":\"https:\/\/andyparkes.co.uk\/blog\/index.php\/2010\/05\/14\/sharepoint-as-a-twitter-client-sort-of-part-four\/\",\"name\":\"SharePoint as a Twitter Client. Sort of \u2013 Part Four - Andy&#039;s Techie Blog\",\"isPartOf\":{\"@id\":\"https:\/\/andyparkes.co.uk\/blog\/#website\"},\"datePublished\":\"2010-05-14T20:00:35+00:00\",\"dateModified\":\"2010-05-14T20:54:16+00:00\",\"author\":{\"@id\":\"https:\/\/andyparkes.co.uk\/blog\/#\/schema\/person\/3534e8ac6b1bec765cd061feff56679d\"},\"breadcrumb\":{\"@id\":\"https:\/\/andyparkes.co.uk\/blog\/index.php\/2010\/05\/14\/sharepoint-as-a-twitter-client-sort-of-part-four\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/andyparkes.co.uk\/blog\/index.php\/2010\/05\/14\/sharepoint-as-a-twitter-client-sort-of-part-four\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/andyparkes.co.uk\/blog\/index.php\/2010\/05\/14\/sharepoint-as-a-twitter-client-sort-of-part-four\/#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 \u2013 Part Four\"}]},{\"@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 \u2013 Part Four - 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\/05\/14\/sharepoint-as-a-twitter-client-sort-of-part-four\/","og_locale":"en_US","og_type":"article","og_title":"SharePoint as a Twitter Client. Sort of \u2013 Part Four - Andy&#039;s Techie Blog","og_description":"In part three I said there was bit of functionality left to clear up. We have to run the process manually. We actually did a little bit of the ground work in part two. One of the pieces of code was the main function that brings all the bits and pieces together \u2013 it wasRead More","og_url":"https:\/\/andyparkes.co.uk\/blog\/index.php\/2010\/05\/14\/sharepoint-as-a-twitter-client-sort-of-part-four\/","og_site_name":"Andy&#039;s Techie Blog","article_published_time":"2010-05-14T20:00:35+00:00","article_modified_time":"2010-05-14T20:54:16+00:00","author":"Andy Parkes","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Andy Parkes","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/andyparkes.co.uk\/blog\/index.php\/2010\/05\/14\/sharepoint-as-a-twitter-client-sort-of-part-four\/","url":"https:\/\/andyparkes.co.uk\/blog\/index.php\/2010\/05\/14\/sharepoint-as-a-twitter-client-sort-of-part-four\/","name":"SharePoint as a Twitter Client. Sort of \u2013 Part Four - Andy&#039;s Techie Blog","isPartOf":{"@id":"https:\/\/andyparkes.co.uk\/blog\/#website"},"datePublished":"2010-05-14T20:00:35+00:00","dateModified":"2010-05-14T20:54:16+00:00","author":{"@id":"https:\/\/andyparkes.co.uk\/blog\/#\/schema\/person\/3534e8ac6b1bec765cd061feff56679d"},"breadcrumb":{"@id":"https:\/\/andyparkes.co.uk\/blog\/index.php\/2010\/05\/14\/sharepoint-as-a-twitter-client-sort-of-part-four\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/andyparkes.co.uk\/blog\/index.php\/2010\/05\/14\/sharepoint-as-a-twitter-client-sort-of-part-four\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/andyparkes.co.uk\/blog\/index.php\/2010\/05\/14\/sharepoint-as-a-twitter-client-sort-of-part-four\/#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 \u2013 Part Four"}]},{"@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-cf","jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/andyparkes.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/posts\/759","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=759"}],"version-history":[{"count":4,"href":"https:\/\/andyparkes.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/posts\/759\/revisions"}],"predecessor-version":[{"id":765,"href":"https:\/\/andyparkes.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/posts\/759\/revisions\/765"}],"wp:attachment":[{"href":"https:\/\/andyparkes.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=759"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/andyparkes.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=759"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/andyparkes.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=759"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}