{"id":16341532,"url":"https://github.com/psibi/fb","last_synced_at":"2025-03-16T15:30:30.206Z","repository":{"id":18433133,"uuid":"84288314","full_name":"psibi/fb","owner":"psibi","description":null,"archived":false,"fork":false,"pushed_at":"2022-04-26T05:29:09.000Z","size":454,"stargazers_count":18,"open_issues_count":3,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-26T00:42:32.011Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/psibi.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-08T06:48:21.000Z","updated_at":"2022-04-26T05:26:21.000Z","dependencies_parsed_at":"2022-07-26T22:02:15.460Z","dependency_job_id":null,"html_url":"https://github.com/psibi/fb","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psibi%2Ffb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psibi%2Ffb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psibi%2Ffb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psibi%2Ffb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/psibi","download_url":"https://codeload.github.com/psibi/fb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219012073,"owners_count":16423995,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T23:59:42.166Z","updated_at":"2024-10-10T23:59:42.772Z","avatar_url":"https://github.com/psibi.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"fb\n--\n\n[![Build Status](https://dev.azure.com/psibi2000/Haskell%20Projects/_apis/build/status/psibi.fb?branchName=master)](https://dev.azure.com/psibi2000/Haskell%20Projects/_build/latest?definitionId=16\u0026branchName=master)\n\nHaskell bindings to Facebook's API\n\n## Example code to get User Access token\n\n```haskell\n{-# LANGUAGE OverloadedStrings #-}\n{-# LANGUAGE ScopedTypeVariables #-}\n\nimport Facebook\nimport Network.HTTP.Client\nimport Network.HTTP.Client.TLS\nimport Control.Monad.Trans.Control\nimport Control.Monad.Trans.Resource\nimport Control.Monad.IO.Class\nimport Data.Monoid ((\u003c\u003e))\nimport Data.ByteString.Char8 (pack)\nimport Data.Text hiding (pack)\nimport Data.Aeson\nimport qualified Data.Text.Encoding as TE\n\nmyCreds :: Credentials\nmyCreds =\n  Credentials\n  { appName = \"Your_APP_Name\"\n  , appId = \"your_app_id\"\n  , appSecret = \"xxxxxxxxxxxxxxxxx\"\n  , appSecretProof = False\n  }\n\nmain :: IO ()\nmain = do\n  mgr \u003c- newManager tlsManagerSettings\n  let redirectUrl = \"https://www.yourdomain.com/\"\n  runResourceT $\n    runFacebookT myCreds mgr $\n    do url1 \u003c- getUserAccessTokenStep1 redirectUrl [\"public_profile\", \"email\"]\n       liftIO $ print (\"Paste the url in browser and get code: \" \u003c\u003e url1)\n       code \u003c- liftIO $ getLine\n       token \u003c- getUserAccessTokenStep2 redirectUrl [(\"code\", pack code)]\n       liftIO $ print token\n```\n\n## Snippet to get your Profile Picture:\n\n```\n       (picture :: Value) \u003c-\n         getObject \"/me/picture\" [(\"redirect\", \"0\")] (Just token)\n       liftIO $ print picture\n```\n\n## Snippet to get your firstname, lastname:\n\n```\n       user \u003c- getUser \"me\" [(\"fields\", \"first_name,last_name\")] (Just token)\n       liftIO $ print user\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpsibi%2Ffb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpsibi%2Ffb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpsibi%2Ffb/lists"}