Skip to content

Latest commit

 

History

History
62 lines (45 loc) · 2.28 KB

README.md

File metadata and controls

62 lines (45 loc) · 2.28 KB

fb-group-stats

Make process calls the parse deploy tool, so it needs the parse deploy tool to be installed.

Run make build to compile

make deploy to deploy

Before building, make sure the following environment variables:

After deploying, make sure to set up the grabFacebookPosts background job to grab all the posts from your facebook group as frequently as you like.

Facebook Access Tokens Expire

Use the graph API explorer to get a temporary access token for testing. This token will expire in one hour.

Once you're ready to make a more permanent access token, make a facebook app, set the permissions you need, and click debug on the app's access token so you can get to the page that allows you to Extend Access Token

Check group activity

Easy Range - (Days Back, Days Forward)

Example: If I want to look back to last month, daysBack = 60 and daysForward = 30. If I want to look at this week, daysBack = 7 and daysForward = 7.

curl -X POST \
  -H "X-Parse-Application-Id: _PARSEAPPID_" \
  -H "X-Parse-REST-API-Key: _PARSEAPIKEY_" \
  -H "Content-Type: application/json" \
  -d '{"daysBack": _daysBack_, "daysForward": _daysForwardFromThere_}' \
  https://api.parse.com/1/functions/countItems

Exact Range - (Start Date, End Date)

Specify the specific range to get a count. startDate and endDate are both Javascript Date Objects.

curl -X POST \
  -H "X-Parse-Application-Id: _PARSEAPPID_" \
  -H "X-Parse-REST-API-Key: _PARSEAPIKEY_" \
  -H "Content-Type: application/json" \
  -d '{"beginDate": _startDate_, "endDate": _endDate_}' \
  https://api.parse.com/1/functions/countItemsWithDateRanges

You can find your PARSEAPPID and PARSEAPIKEY in your Parse dashboard for your App.