Permalink
Browse files

Expand docs for jabber and twitter contacts.

  • Loading branch information...
1 parent 4868f25 commit 1308f1cfcb6ebe667394e0e38d9bf5e8c4179e28 @mojombo mojombo committed Jul 1, 2010
Showing with 36 additions and 2 deletions.
  1. +36 −2 site/index.html
View
@@ -559,7 +559,7 @@
<!-- ------------------------------------------------------------------------- -->
-<h1>Notifications</h1>
+<h1><a name="notifications">Notifications</a></h1>
<p>God has an extensible notification framework built in that makes it easy to have notifications sent when conditions are triggered. Each notification type has a set of configuration parameters that must be set. These parameters may be set globally via Contact Defaults or individually via Contact Instances.</p>
@@ -678,7 +678,9 @@
<h2>Jabber</h2>
-<p>Send a notice to a Jabber address.</p>
+<p>Send a notice to a Jabber address (<a href="http://jabber.org/">http://jabber.org/</a>).</p>
+
+<p>Google Mail addresses should work. If you need a non-Gmail address, you can sign up for one at <a href="http://register.jabber.org">http://register.jabber.org/</a>.</p>
<pre><code class="ruby">God::Contacts::Jabber.defaults do |d|
...
@@ -729,6 +731,38 @@
<p>Send a notice to a Twitter account (<a href="http://twitter.com/">http://twitter.com/</a>).</p>
+<p>In order to use the Twitter notification, you will need to authorize God via OAuth and then get the OAuth token and secret for your account. The easiest way to do this is with a Ruby gem called <code>twurl</code>. Install it like so:
+
+<pre><code>[sudo] gem install twurl</code></pre>
+
+Then, run the following:
+
+<pre><code>twurl auth --consumer-key gOhjax6s0L3mLeaTtBWPw \
+ --consumer-secret yz4gpAVXJHKxvsGK85tEyzQJ7o2FEy27H1KEWL75jfA</code></pre>
+
+<p>This will return a URL. Copy it to your clipboard. Make sure you are logged into Twitter with the account that will used for the notifications, and then paste the URL into a new browser window. At the end of the authentication process, you will be given a PIN. Copy this PIN and paste it back to the command line prompt. Once this is complete, you need to find your access token and secret:</p>
+
+<pre><code>cat ~/.twurlrc</code></pre>
+
+<p>This will output the contents of the config file from which you can grab your access token and secret:</p>
+
+<pre><code>---
+profiles:
+ mojombo:
+ gOhjax6s0L3mLeaTtBWPw:
+ <b style="color: red;">token: 17376380-KXA91nCrgaQ4HxUXMmZtM38gB56qS3hx1NYbjT6mQ</b>
+ consumer_key: gOhjax6s0L3mLeaTtBWPw
+ username: mojombo
+ consumer_secret: yz4gpAVXJHKxvsGK85tEyzQJ7o2FEy27H1KEWL75jfA
+ <b style="color: red;">secret: EBWFQBCtuMwCDeU4OXlc3LwGyY8OdWAV0Jg5KVB0</b>
+configuration:
+ default_profile:
+ - mojombo
+ - gOhjax6s0L3mLeaTtBWPw
+</code></pre>
+
+<p>The access token and secret (highlighted in red above) are what you need to use as parameters to the Twitter notification.</p>
+
<pre><code class="ruby">God::Contacts::Twitter.defaults do |d|
...
end

0 comments on commit 1308f1c

Please sign in to comment.