Skip to content

Instantly share code, notes, and snippets.

@mwotton
Created March 26, 2012 04:08
Show Gist options
  • Save mwotton/2202886 to your computer and use it in GitHub Desktop.
Save mwotton/2202886 to your computer and use it in GitHub Desktop.
--
-- Would you belive there was no way to create a token other than to do the full
-- authentication process in hoauth? This just creates value of type 'Token' for
-- this package from some strings.
--
createToken :: T.Consumer -> OAuthTokenAndSecret -> O.Token
createToken c (OAuthTokenAndSecret token secret) = AccessToken app tokFields
where
app = Application (T.key c) (T.secret c) OOB
tokFields = R.fromList [ ("oauth_token", token), ("oauth_token_secret", secret) ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment