Skip to content

Instantly share code, notes, and snippets.

@jsakamoto
Created September 5, 2012 14:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jsakamoto/3637520 to your computer and use it in GitHub Desktop.
Save jsakamoto/3637520 to your computer and use it in GitHub Desktop.
F# で Twitterizer を使って Twitter につぶやく
module Bot
open System.Configuration
open Newtonsoft.Json
open Twitterizer
let Tweet() =
// Need appSettings section in .config:
// <add key="key" value="{ConsumerKey:'...', ConsumerSecret:'...', AccessToken:'...', AccessTokenSecret:'...'}" />
let key = ConfigurationManager.AppSettings.["twitterKey"]
let tokens = JsonConvert.DeserializeObject<OAuthTokens>(key)
TwitterStatus.Update(tokens, "つぶやいてみるよ。") |> ignore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment