angular-facebook-api-factory is an angularjs module with a facebook api factory.
Author: Jonathan Hornung (JohnnyTheTank)
Usage
- Install via either bower, npm or downloaded files:
bower install --save angular-facebook-api-factory
npm install --save angular-facebook-api-factory
- download angular-facebook-api-factory.zip
- Add
jtt_facebook
to your application's module dependencies.
- Include dependencies in your HTML.
- When using bower:
<script src="bower_components/angular-facebook-api-factory/src/angular-facebook-api-factory.min.js"></script>
- When using npm:
<script src="node_modules/angular-facebook-api-factory/src/angular-facebook-api-factory.min.js"></script>
- when using downloaded files
<script src="angular-facebook-api-factory.min.js"></script>
- Use the factory
facebookFactory
factory methods
getPosts
facebookFactory.getPostsFromPageById({
pageId:"<PAGE_ID>",
limit:"<LIMIT>",
until:"<UNTIL>",
since:"<SINCE>",
__previous:"<PREVIOUS>",
__paging_token:"<PAGING_TOKEN>",
access_token:"<ACCESS_TOKEN>"
}).then(function (_data) {
}).catch(function (_data) {
});
getPhotos
facebookFactory.getPhotosFromPageById({
page:"<PAGE>",
limit:"<LIMIT>",
before:"<BEFORE>",
after:"<AFTER>",
access_token:"<ACCESS_TOKEN>"
}).then(function (_data) {
}).catch(function (_data) {
});
getVideos
facebookFactory.getVideosFromPageById({
pageId:"<PAGE_ID>",
limit:"<LIMIT>",
before:"<BEFORE>",
after:"<AFTER>",
access_token:"<ACCESS_TOKEN>"
}).then(function (_data) {
}).catch(function (_data) {
});
getEvents
facebookFactory.getEventsFromPageById({
pageId:"<PAGE_ID>",
limit:"<LIMIT>",
before:"<BEFORE>",
after:"<AFTER>",
access_token:"<ACCESS_TOKEN>"
}).then(function (_data) {
}).catch(function (_data) {
});
getPage
facebookFactory.getPageById({
pageId:"<PAGE_ID>",
access_token:"<ACCESS_TOKEN>"
}).then(function (_data) {
}).catch(function (_data) {
});
Facebook Graph JSON API
License
MIT