php file using Facebook php graph SDK to get info about groups in Facebook
At the root directory of the project, create a virtual machine with all prerequesites. If you are not familiar with vagrant, please refer to latest official documentation: https://www.vagrantup.com/
vagrant up
vagrant ssh
cd /vagrant
you should see project files on this folder in the created virtual machine
In get_group_feeds.php file:
-
Replace APPLICATION_ID & APPLICATION_SECRET by your own
-
Get an access token from Facebook & replace TOKEN_ID. You can easily obtain it through Facebook graph explorer: https://developers.facebook.com/tools/explorer/ . This token would be available only for one hour
-
Get the group ID you want to crawl the feeds :
- open a tab with your favorite browser & open up the facebook group/page
- Copy the URL & paste URL at https://lookup-id.com/ to determine the group ID
- replace GROUP_ID , SINCE_DATE and UNTIL_DATE by your own
-
Specify time interval using 'since' & 'until' properties. Please note that these datetime are unixtimestamp format. You can easily find a unixtimestamp format of any date here: https://www.epochconverter.com/
-
Specify a file to save the feeds by replacing in all files in Facebook folder.
-
Get group feeds & format it to be used by Excel using the followings commands:
cd /vagrant
php Facebook/get_group_feed.php
php Facebook/pretty_print.php