Skip to content

Script using GRAPH API to GET information about each post from any facebook page. Script Shows content of post, likes(only likes not reactions). In near future I will upgrade it to show every reaction, comment with reactions.

License

Notifications You must be signed in to change notification settings

MEJSIK/Facebook-News-Feed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Facebook-News-Feed

Script using GRAPH API to GET information about each post from any facebook page. Script Shows content of post, likes(only likes not reactions).

Working DEMO: https://mejsik.github.io/Facebook-News-Feed/

This how it's looks like:

v2.2

  • Added AJAX HTTP Request which shows dynamicly your page feed

v2.1

  • Added Regular Expression to GET link adress(ex.youtube)

v2.0

  • Added photos from each post
  • Added each post created time
  • Added displaying like count

I used angular.js and Facebook Graph API.

feed.js:

var app = angular.module('facebookFeed', []);
var pageId = '[PAGE-ID]'; //Your PageID
var token = '[APP-ID]]|[SECRET-CODE]'; //Your Access Token

// Request below GET every post using Graph API
app.controller('facebookFeedControler', function ($scope, $http) {
    $http.get(`https://graph.facebook.com/${pageId}/?fields=posts.limit(10){message,likes.limit(0).summary(1),created_time}&access_token=${token}`)
        .then(function (response) {
            $scope.posts = response.data.posts.data;
        });
});

NOTE:To get into any data use '{}' ex. {{post.message}} in HTML file.

NOTE: You just need pageID and access token. In near future I will upgrade to show all reactions and comments with reactions.

About

Script using GRAPH API to GET information about each post from any facebook page. Script Shows content of post, likes(only likes not reactions). In near future I will upgrade it to show every reaction, comment with reactions.

Resources

License

Stars

Watchers

Forks

Packages

No packages published