File: tryIt.hs

package info (click to toggle)
haskell-fb 1.2.1-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 220 kB
  • sloc: haskell: 2,471; makefile: 2
file content (18 lines) | stat: -rw-r--r-- 462 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
module TryIt (runFB) where

-- You may import this file from GHCi in order to try the fb
-- package.  For example:
--
--   > :l tryIt
--
--   > runFB FB.getAppAccessToken

import qualified Data.Conduit as C
import qualified Facebook as FB
import qualified Network.HTTP.Conduit as H
import Main (getCredentials)

runFB :: FB.FacebookT FB.Auth (C.ResourceT IO) a -> IO a
runFB act = do
  creds <- getCredentials
  H.withManager $ \m -> FB.runFacebookT creds m act