Skip to content

php scripts using Facebook php graph SDK to get info on Facebook

License

Notifications You must be signed in to change notification settings

billmetangmo/facebook-php-crawl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

facebook-php-crawl

php file using Facebook php graph SDK to get info about groups in Facebook

Requirements

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

Getting Started

In get_group_feeds.php file:

  1. Replace APPLICATION_ID & APPLICATION_SECRET by your own

  2. 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

  3. 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
  4. 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/

  5. Specify a file to save the feeds by replacing in all files in Facebook folder.

  6. 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

Releases

No releases published

Packages

No packages published