Created
September 5, 2012 14:32
-
-
Save jsakamoto/3637520 to your computer and use it in GitHub Desktop.
F# で Twitterizer を使って Twitter につぶやく
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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