{"id":19541784,"url":"https://github.com/nullscreen/fb-support","last_synced_at":"2026-02-14T06:31:54.205Z","repository":{"id":65581500,"uuid":"98240556","full_name":"nullscreen/fb-support","owner":"nullscreen","description":"Common code needed by the other Fb gems. Not intended for direct use","archived":false,"fork":false,"pushed_at":"2022-10-30T20:49:01.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":3,"subscribers_count":8,"default_branch":"main","last_synced_at":"2026-01-14T00:19:51.478Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":false,"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/nullscreen.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-24T22:34:28.000Z","updated_at":"2022-10-30T20:49:38.000Z","dependencies_parsed_at":"2023-01-30T14:10:12.861Z","dependency_job_id":null,"html_url":"https://github.com/nullscreen/fb-support","commit_stats":null,"previous_names":["fullscreen/fb-support"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/nullscreen/fb-support","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nullscreen%2Ffb-support","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nullscreen%2Ffb-support/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nullscreen%2Ffb-support/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nullscreen%2Ffb-support/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nullscreen","download_url":"https://codeload.github.com/nullscreen/fb-support/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nullscreen%2Ffb-support/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29438766,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T05:24:35.651Z","status":"ssl_error","status_checked_at":"2026-02-14T05:24:34.830Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-11-11T03:11:56.524Z","updated_at":"2026-02-14T06:31:54.190Z","avatar_url":"https://github.com/nullscreen.png","language":"Ruby","readme":"Common code needed by the other Fb gems\n=======================================\n\nFb::Support provides common functionality to all Fb gems.\nIt is considered suitable for internal use only at this time.\n\nThe **source code** is available on [GitHub](https://github.com/fullscreen/fb-support) and the **documentation** on [RubyDoc](http://www.rubydoc.info/gems/fb-support/frames).\n\n[![Build Status](http://img.shields.io/travis/Fullscreen/fb-support/master.svg)](https://travis-ci.org/Fullscreen/fb-support)\n[![Coverage Status](http://img.shields.io/coveralls/Fullscreen/fb-support/master.svg)](https://coveralls.io/r/Fullscreen/fb-support)\n[![Dependency Status](http://img.shields.io/gemnasium/Fullscreen/fb-support.svg)](https://gemnasium.com/Fullscreen/fb-support)\n[![Code Climate](http://img.shields.io/codeclimate/github/Fullscreen/fb-support.svg)](https://codeclimate.com/github/Fullscreen/fb-support)\n[![Online docs](http://img.shields.io/badge/docs-✓-green.svg)](http://www.rubydoc.info/gems/fb-support/frames)\n[![Gem Version](http://img.shields.io/gem/v/fb-support.svg)](http://rubygems.org/gems/fb-support)\n\nFb::Support provides:\n\n* [Fb.configure](http://www.rubydoc.info/gems/fb-support/Fb/Config#configure-instance_method)\n* [Fb::Configuration](http://www.rubydoc.info/gems/fb-support/Fb/Configuration)\n* [Fb::HTTPRequest](http://www.rubydoc.info/gems/fb-support/Fb/HTTPRequest)\n* [Fb::HTTPError](http://www.rubydoc.info/gems/fb-support/Fb/HTTPError)\n\n## Response callback\n\n`Fb::HTTPRequest` has an `on_response` callback which is invoked with\nthe request object and the HTTP response object on a successful\nresponse. This can be used for introspecting responses, performing some\naction when rate limit is near, etc.\n\n```rb\nFb::HTTPRequest.on_response = lambda do |request, response|\n  usage = request.rate_limiting_header\n  Librato.measure 'fb.call_count', usage['call_count']\n  Librato.measure 'fb.total_cputime', usage['total_cputime']\n  Librato.measure 'fb.total_time', usage['total_time']\n  if usage.values.any? {|value| value \u003e 85 }\n    sleep 180\n  end\nend\n```\n\nHow to test\n===========\n\nIn order to run the tests you need to have one Facebook access token and set\nit as an environment variable:\n\n    export FB_TEST_ACCESS_TOKEN=\"5040|67b895\"\n\nThere are many [documented ways](https://developers.facebook.com/docs/facebook-login/access-tokens#apptokens) to generate a test access token.\nThe easiest way is probably to:\n\n- create a Facebook app\n- copy its app Id and app Secret\n- join them as \"app-id|app-secret\"… that is a valid access token!\n\n\nHow to contribute\n=================\n\nContribute to the code by forking the project, adding the missing code,\nwriting the appropriate tests and submitting a pull request.\n\nIn order for a PR to be approved, all the tests need to pass and all the public\nmethods need to be documented and listed in the guides. Remember:\n\n- to run all tests locally: `bundle exec rspec`\n- to generate the docs locally: `bundle exec yard`\n- to list undocumented methods: `bundle exec yard stats --list-undoc`\n\nThanks :tada:\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnullscreen%2Ffb-support","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnullscreen%2Ffb-support","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnullscreen%2Ffb-support/lists"}