{"id":13509510,"url":"https://github.com/oivoodoo/exfacebook","last_synced_at":"2025-04-24T04:35:48.005Z","repository":{"id":54666087,"uuid":"63441834","full_name":"oivoodoo/exfacebook","owner":"oivoodoo","description":"Facebook API","archived":false,"fork":false,"pushed_at":"2021-02-04T21:04:07.000Z","size":106,"stargazers_count":18,"open_issues_count":3,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-26T08:42:10.582Z","etag":null,"topics":["batch-api","elixir","elixir-lang","facebook","facebook-api"],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oivoodoo.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2016-07-15T18:10:33.000Z","updated_at":"2020-01-13T09:17:54.000Z","dependencies_parsed_at":"2022-08-13T23:20:11.408Z","dependency_job_id":null,"html_url":"https://github.com/oivoodoo/exfacebook","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oivoodoo%2Fexfacebook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oivoodoo%2Fexfacebook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oivoodoo%2Fexfacebook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oivoodoo%2Fexfacebook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oivoodoo","download_url":"https://codeload.github.com/oivoodoo/exfacebook/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232400264,"owners_count":18517353,"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":["batch-api","elixir","elixir-lang","facebook","facebook-api"],"created_at":"2024-08-01T02:01:08.800Z","updated_at":"2025-01-03T22:23:18.006Z","avatar_url":"https://github.com/oivoodoo.png","language":"Elixir","funding_links":[],"categories":["Third Party APIs"],"sub_categories":[],"readme":"# exfacebok\n\nInspired by koala gem in Ruby\n\n[Documentation](https://hexdocs.pm/exfacebook/Exfacebook.html)\n\n## Installation\n\nIf [available in Hex](https://hex.pm/docs/publish), the package can be installed as:\n\n  1. Add exfacebook to your list of dependencies in `mix.exs`:\n\n        def deps do\n          [{:exfacebook, \"~\u003e 0.0.9\"}]\n        end\n\n  2. Ensure exfacebook is started before your application:\n\n        def application do\n          [applications: [:exfacebook]]\n        end\n\n\n## Examples\n\n\n```elixir\n  {:ok, pid} = Exfacebook.start_link\n\n  {:ok, attributes} = Exfacebook.get_object(pid, :me, %{access_token: \"access-token\"})\n```\n\n```elixir\n  {:ok, %{\"data\" =\u003e collection}} = response = Exfacebook.get_connections(pid, :feed, %{fields: \"id, name\", access_token: \"access-token\"})\n```\n\n```elixir\n  response = Exfacebook.get_connections(pid, :feed, %{fields: \"id, name\", access_token: \"access-token\"})\n  {:ok, %{\"data\" =\u003e collection1}} = response2 = Exfacebook.next_page(pid, response)\n  {:ok, %{\"data\" =\u003e collection2}} = Exfacebook.prev_page(pid, response2)\n```\n\nExample of batch requests:\n\n```elixir\n  [{:ok, %{\"data\" =\u003e collection}}, {:ok, %{\"id\" =\u003e id, \"name\" =\u003e name}}] = Exfacebook.batch(%{access_token: \"access-token\"}, fn(api) -\u003e\n    api = api |\u003e Exfacebook.get_object(pid, :me, %{fields: \"id, name\"})\n    api = api |\u003e Exfacebook.get_connections(pid, :feed, %{fields: \"id, name\"})\n    api\n  end)\n```\n\nExample of posting message to feed:\n\n```elixir\n  Exfacebook.put_connections(:me, :feed, %{access_token: \"access-token\"}, %{message: \"hello\"})\n```\n\nUsing `Exfacebook.Api` outside of GenServer. `Exfacebook` module is working as\nproxy for accessing Api module by specifying `GET` requests as `call` and `PUT`\nas `cast` actions.\n\n```elixir\n  {:ok, attributes} = Exfacebook.Api.get_object(:me, %{access_token: \"access-token\"})\n```\n\n## Examples\n\n```\n  iex -S mix\n```\n\n```elixir\n  Code.require_file(\"example.exs\", \"examples/\")\n```\n\nIt should produce logging messages about the objects and attributes from feed and me requests.\n\n## TODO:\n\n- [x] add test for get_connections\n- [x] add test for next_page\n- [x] add test for prev_page\n- [x] batch api for get_object and get_connections\n- [x] batch api for put_*\n- [x] put_*\n- [x] wrap api by GenServer for put operations as cast and get as call\n- [x] realtime updates subscribe, list_subscriptions, unsubscribe, meet_challenge\n- [x] add delete_* methods\n- [x] add put video and image\n- [x] add get exchange token\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foivoodoo%2Fexfacebook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foivoodoo%2Fexfacebook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foivoodoo%2Fexfacebook/lists"}