Windows Live Writer 2012 Twitter and Bitly Plugin

Microsoft has open-sourced the Windows Live Writer platform as Open Live Writer which can be found at OpenLiveWriter.org.

This plug-in has not been updated for Open Live Writer and I have no plans to do so, but you can always make a fork at Github. ūüôā

Source code repo:

https://github.com/sstjean/WLWTwitterBitlyPlugin

Description

The Twitter and Bitly plugin for Windows Live Writer is a plugin that triggers when you publish a blog post in Windows Live Writer. Upon trigger, the plugin calls out to Bitly.com to convert your post’s URL into a short form.¬† It then uses a user-defined tweet template to generate a tweet that is then displayed in a preview window.¬† You can make edits to the tweet prior to posting or post to Twitter as-is.

2015-05-30_19-59-49

(Credits)

To report a bug or suggest a feature

Go to the Issues page for this project on GitHub to submit a bug or feature request.

https://github.com/sstjean/WLWTwitterBitlyPlugin/issues


To install and use the plugin:

  1. Download the plugin’s zip file.
  2. Extract the zip file contents (one dll file, one text file) to Windows Live Writer’s Plugins folder.¬† This is usually found at:
    C:\Program Files (x86)\Windows Live\Writer\Plugins
  3. Run Windows Live Writer and follow the configuration steps below.
  4. Create a blog post and publish to your blog.  After the blog post has been published the plugin will popup an editable preview windows showing the text of your tweet.
    2015-05-30_19-59-49
  • From this dialog you can make any edits you wish.¬† When you are satisfied with the post click the Post Tweet button to post the contents of the text box to Twitter.
  • If you do not wish to post to Twitter then click the Do not post Tweet button.
  • If you have more than 140 characters in the text box, the character counter will turn red and the Post Tweet button will be disabled.¬† To enable the Post Tweet button just reduce the character count in the text box to 140 or less.
    2015-05-30_20-04-37

To configure the plugin to post to Twitter:

  1. Go to the Insert tab and then select the Plugin Options item.
    WLWPluginOptions
  2. In the Options dialog select the Twitter and Bitly Plugin.¬† Make sure the Plug-in details a the bottom¬†of the form¬†has On selected then click the Options… button.
    2015-05-30_18-42-18
  3. In the plugin’s Options dialog you will need to first click on the Authorize Plugin at Twitter button.¬† This will launch a browser window and load Twitter’s authorization page.
    2015-05-30_18-46-21
  4. In Twitter’s authorization page enter your Twitter username and password then click the Authorize app button.¬† The plugin does not see and does not have access to your password.¬† It will store a security token provided by Twitter and use that to post on your behalf.
    2015-05-27_18-58-38
  5. The Twitter window will close and you will be back at the plugin’s Options window.
    2015-05-30_18-46-21
  6. Click on the Done button to return to the Windows Live Writer Options dialog.
  7. Click the Ok button to close the Options dialog.

Back to configuration steps


To configure the Twitter post template

  1. Go to the Insert tab and then select the Plugin Options item.
    WLWPluginOptions
  2. In the Options dialog select the Twitter and Bitly Plugin.¬† Make sure the Plug-in details a the bottom¬†of the form¬†has On selected then click the Options… button.
    2015-05-30_18-42-18
  3. In the plugin’s Options dialog you will need to first click on the Configure the Twitter post template button.¬† This will open the Twitter Post Settings dialog..
    2015-05-30_18-46-21
  4. In the Twitter Post Settings dialog there is a text box in which you can enter the format you want to use for your tweet.¬† By default, the plugin starts out with a format of [Blog] <title> - <url>.¬†¬† The <title> and <url> strings are macros that will be replaced with your blog posts’ title and the post’s URL.¬† All of the remaining text and white space will be left as-is.
    For example, if the title of your current blog post is “Why I like pudding” and the url returned from Bitly is “http://bit.ly/abc123” then, by default, the plugin would show “[Blog] Why I like pudding – http://bit.ly/abc123” when you publish the blog post.
    2015-05-30_18-49-34
  5. You can change the text of the template however you like. Both the <title> and <url> macros are optional so you can use one, both or neither in your template.  Also, the position of the  <title> and <url> macros is up to you.  The  <title> macro does not have to appear before the <url> macro.
    As you type, the plugin will interpret your template and show you an example tweet below the text box.
    2015-05-30_18-49-34
  6. When you are done editing your template, click the Ok button to save your template.¬† Click the Cancel button to discard your changes.¬† In either case, you will be returned to the plugin’s Options dialog.
    2015-05-30_18-46-21
  7. Click on the Done button to return to the Windows Live Writer Options dialog.
  8. Click the Ok button to close the Options dialog.

Back to configuration steps


To configure the plugin to shorten your blog post URL using  Bitly

  1. Go to the Insert tab and then select the Plugin Options item.
    WLWPluginOptions
  2. In the Options dialog select the Twitter and Bitly Plugin.¬† Make sure the Plug-in details a the bottom¬†of the form¬†has On selected then click the Options… button.
    2015-05-30_18-42-18
  3. To configure Bitly, click on the Authorize Plugin at Bitly button.¬† This will launch a browser window and load Bitly’s authorization page.
    2015-05-30_18-46-21
  4. Login to Bitly with either your Facebook, Twitter or Bitly account.  This will load the Authorization page.
    2015-05-28_1-46-41
  5. Click the Allow button to authorize the plugin.  The plugin does not see and does not have access to your password.  It will store a security token provided by Bitly and use that to shorten URLs within your account and on your behalf.
    2015-05-28_1-49-53
  6. The Bitly window will close and you will be back at the plugin’s Options window.
    2015-05-30_18-46-21
  7. Click on the Done button to return to the Windows Live Writer Options dialog.
  8. Click the Ok button to close the Options dialog.

Back to configuration steps


To Revoke Twitter authorization

  1. If at any time you wish to revoke authorization, you can go to https://twitter.com/settings/applications and click the Revoke button next to the WLW Twitter and Bitly Plugin entry.
    2015-05-27_19-05-36

Back to configuration steps


Credits

This plugin is based on the work of a number of other people.  Their blog posts and code was invaluable in getting this up and running.

Bitly OAuth blog and code by Christophe Geer

Developing Plugins for Windows Live Writer (DevX.com) by Scott Lovegrove

Twitter and OAuth1.0 plugins for Cropper (Codeplex.com)

TinyTwitter project on GitHub by Juan María Hernández

 

Leave a Reply

Your email address will not be published. Required fields are marked *