{"id":21292014,"url":"https://github.com/johnnythetank/aping-plugin-facebook","last_synced_at":"2025-07-11T16:31:10.151Z","repository":{"id":57147265,"uuid":"46438402","full_name":"JohnnyTheTank/apiNG-plugin-facebook","owner":"JohnnyTheTank","description":"Facebook Plugin for apiNG","archived":false,"fork":false,"pushed_at":"2017-09-07T20:00:59.000Z","size":57,"stargazers_count":4,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-17T04:51:29.573Z","etag":null,"topics":["angular","api","aping","aping-plugin","facebook","facebook-graph-api","fb","social-wall"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/JohnnyTheTank.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":"2015-11-18T18:21:35.000Z","updated_at":"2018-06-04T15:06:31.000Z","dependencies_parsed_at":"2022-09-03T06:21:43.055Z","dependency_job_id":null,"html_url":"https://github.com/JohnnyTheTank/apiNG-plugin-facebook","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnnyTheTank%2FapiNG-plugin-facebook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnnyTheTank%2FapiNG-plugin-facebook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnnyTheTank%2FapiNG-plugin-facebook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnnyTheTank%2FapiNG-plugin-facebook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JohnnyTheTank","download_url":"https://codeload.github.com/JohnnyTheTank/apiNG-plugin-facebook/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225741250,"owners_count":17516895,"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":["angular","api","aping","aping-plugin","facebook","facebook-graph-api","fb","social-wall"],"created_at":"2024-11-21T13:47:13.487Z","updated_at":"2024-11-21T13:47:13.997Z","avatar_url":"https://github.com/JohnnyTheTank.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[logo]: http://aping.io/logo/320/aping-plugin.png \"apiNG Plugin\"\n![apiNG][logo]\n\n[![Join the chat at https://gitter.im/JohnnyTheTank/apiNG](https://img.shields.io/badge/GITTER-join%20chat-green.svg)](https://gitter.im/JohnnyTheTank/apiNG?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n[![npm version](https://badge.fury.io/js/aping-plugin-facebook.svg)](https://badge.fury.io/js/aping-plugin-facebook)\n[![Bower version](https://badge.fury.io/bo/apiNG-plugin-facebook.svg)](https://badge.fury.io/bo/apiNG-plugin-facebook)\n\n**_apiNG-plugin-facebook_** is a [Facebook Graph API](https://developers.facebook.com/docs/graph-api) plugin for [**apiNG**](https://github.com/JohnnyTheTank/apiNG).\n\n# Information\n* **Supported apiNG models: `social`, `image`, `video`, `event`**\n* This plugin supports the [`get-native-data` parameter](https://aping.readme.io/docs/advanced#parameters)\n* This plugin needs an [access token](#2-access-token) :warning:\n* Used promise library: [angular-facebook-api-factory](https://github.com/JohnnyTheTank/angular-facebook-api-factory) _(included in distribution files)_\n\n# Documentation\n\n1. [INSTALLATION](#1-installation)\n    1. Get file\n    2. Include file\n    3. Add dependency\n    4. Add plugin\n2. [ACCESS TOKEN](#2-access-token)\n    1. Generate your `access_token`\n    2. Insert your `access_token` into `aping-config.js`\n3. [USAGE](#3-usage)\n    1. Models\n    2. Requests\n    3. Rate limit\n\n\n## 1. INSTALLATION\n\n### I. Get file\nInstall via either [bower](http://bower.io/), [npm](https://www.npmjs.com/), CDN (jsDelivr) or downloaded files:\n\n* `bower install apiNG-plugin-facebook --save`\n* `npm install aping-plugin-facebook --save`\n* use [CDN file](https://www.jsdelivr.com/projects/aping.plugin-facebook)\n* download [apiNG-plugin-facebook.zip](https://github.com/JohnnyTheTank/apiNG-plugin-facebook/zipball/master)\n\n### II. Include file\nInclude `aping-plugin-facebook.min.js` in your apiNG application\n\n```html\n\u003c!-- when using bower --\u003e\n\u003cscript src=\"bower_components/apiNG-plugin-facebook/dist/aping-plugin-facebook.min.js\"\u003e\u003c/script\u003e\n\n\u003c!-- when using npm --\u003e\n\u003cscript src=\"node_modules/aping-plugin-facebook/dist/aping-plugin-facebook.min.js\"\u003e\u003c/script\u003e\n\n\u003c!-- when using cdn file --\u003e\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/aping-plugin-facebook@latest/dist/aping-plugin-facebook.min.js\"\u003e\u003c/script\u003e\n\n\u003c!-- when using downloaded files --\u003e\n\u003cscript src=\"aping-plugin-facebook.min.js\"\u003e\u003c/script\u003e\n```\n\n### III. Add dependency\nAdd the module `jtt_aping_facebook` as a dependency to your app module:\n```js\nangular.module('app', ['jtt_aping', 'jtt_aping_facebook']);\n```\n\n### IV. Add the plugin\nAdd the plugin's directive `aping-facebook=\"[]\"` to your apiNG directive and [configure your requests](#ii-requests)\n```html\n\u003caping\n    template-url=\"templates/social.html\"\n    model=\"social\"\n    items=\"20\"\n    aping-facebook=\"[{'page':'\u003cPAGE_NAME\u003e'}]\"\u003e\n\u003c/aping\u003e\n```\n\n## 2. ACCESS TOKEN\n\n### I. Generate your `access_token`\n1. Login on [developers.facebook.com](https://developers.facebook.com/)\n    - Create an new app\n    - Choose website/webapp\n2. Open [Graph API Explorer](https://developers.facebook.com/tools/explorer/)\n    - Press on `Graph API Explorer` dropdown button\n    - Choose your app\n    - Press on `Get Token` dropdown buton\n    - Choose `Get App Token`\n    - Copy generated `access_token`\n\n### II. Insert your `access_token` into `aping-config.js`\nCreate and open `js/apiNG/aping-config.js` in your application folder. It should be look like this snippet:\n```js\nangular.module('jtt_aping').config(['$provide', function ($provide) {\n    $provide.value(\"apingDefaultSettings\", {\n        apingApiKeys : {\n            facebook: [\n                {'access_token':'\u003cYOUR_FACEBOOK_TOKEN\u003e'}\n            ],\n            //...\n        }\n    });\n}]);\n```\n\n:warning: Replace `\u003cYOUR_FACEBOOK_TOKEN\u003e` with your facebook `access_token`\n\n## 3. USAGE\n\n### I. Models\nSupported apiNG models\n\n|  model   | content | support | max items\u003cbr\u003eper request | (native) default items\u003cbr\u003eper request |\n|----------|---------|---------|--------|---------|\n| `social` | last **posts** from users wall | full    | `100`   | `25`   |\n| `image`  | last **images** from users wall | full    | `100`   | `25`   |\n| `video`  | last **videos** from users wall  | full    | `100`   | `25`   |\n| `event`  | last **events** from users wall  | full    | `100`   | `25`   |\n\n**support:**\n* full: _the source platform provides a full list with usable results_ \u003cbr\u003e\n* partly: _the source platfrom provides just partly usable results_\n\n\n### II. Requests\nEvery **apiNG plugin** expects an array of **requests** as html attribute.\n\n#### Requests by Page\n|  parameter  | sample | default | description | optional |\n|----------|---------|---------|---------|---------|\n| **`page`** | `michaeljackson` |  | name or id of any facebook page | no |\n| **`items`**  | `0`-`100` | `25` | items per request |  yes  |\n| **`showAvatar`** | `true` | `false` | Use `true` for show users avatar as image if post has no own image | yes |\n\nSamples:\n* `[{'page':'muenchen'}, {'page':'Berlin'}, {'page':'Koeln'}]`\n* `[{'page':'muenchen', 'items':10}, {'page':'Berlin', 'items':70}]`\n\n### III. Rate limit\n\nVisit the [official API rate limit documentation](https://developers.facebook.com/docs/graph-api/advanced/rate-limiting)\n\nHere's how rate limiting on the Facebook Graph API works:\n- Rate limiting is done on your Facebook AppId. If your app reaches a rate limit, all calls made for that app will be limited not just on a per-user basis.\n- Rate limiting is calculated by taking the number of users your app had the previous day and adding today's new logins. This gives a base number of users that your app has.\n- **Each app** is given an allotment of **200 API calls per user** in any given **60 minute window**.\n\n# Licence\nMIT\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnnythetank%2Faping-plugin-facebook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnnythetank%2Faping-plugin-facebook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnnythetank%2Faping-plugin-facebook/lists"}