Facebook Post Scheduler

An automated post scheduling app built with React and Javascript
ReactJS AWS Lambda DynamoDB Facebook API Gcloud s3 HTML5 CSS3

Repo

https://github.com/s3603075/fb-scheduler/

https://github.com/s3603075/fb-lambda/

This is a project that was built for an assignment in cloud computing. Originally, the project was done using Google Cloud hosting and AWS lambda, using S3 for image storage and dynamoDB for CRUD operations. The API portion no longer works due to monetary constraints of AWS, however all of the code relating to the AWS Lambda/Cloudwatch functions are still available in the repo.

The project was created using a wide range of technologies to demonstrate ‘serverless’ architecture, and to seamlessly integrate and unify different APIs and platforms to create a single product.

Summary

The Facebook post scheduler is a useful tool for companies or other entities to manage and plan their Facebook posts in advance and will allow them to be notified of when their posts are live on any of their managed Facebook pages. This makes it easy for companies to plan and organise a consistent posting schedule, without having to manually complete the process online.

Software architecture

The APIs used for the project includes the Facebook API. The documentation can be seen at https://developers.facebook.com/docs/. This project utilised the Facebook Graph API for posting to pages, and the Facebook Authentication tool to authenticate users.

Developer/Setup Documentation

  1. Clone the git repo

Clone repo

  1. Create a new directory within the src folder named ‘const’. Within the const folder, create two new configuration files aws.js and fb.js. These will serve as your keys for the APIs that are essential to running this program. The files must be configured, as follows:

For aws.js:

AWS setup

For fb.js:

FB setup

  1. For the Facebook API sign in to work, you must have an app id. Facebook authorisation must be configured within the console, where the callback URL for authentication must be the same for your deployment URL (if deploying by gcloud, it is the same URL). For more details, please see https://developers.facebook.com/docs/.

  2. For the AWS API to work with S3, you must place your AWS details in the config file. Please note that you must have read and write permissions for S3 on your access identity policy. For more details please refer to the AWS documentation https://docs.aws.amazon.com/

  3. Once the configuration files are saved, deploy the app onto the Google Cloud platform by going into the project directory, then type ‘gcloud app deploy’, then type ‘y’ in the next prompts.

  1. Confirm the app’s installation by typing ‘gcloud app browse’.

  1. Additionally, all AWS services connected must be live and activated. To setup Lambda, you must first set your IAM role.

  1. Upload the AWS code to Lambda and setup a gateway for AWS gateway. This happens for each separate Lambda function code.

  1. The AWS API gateway must have cross-origin permissions enabled.

  1. Additionally, you must setup DynamoDB and Amazon SES, which can be found in these references https://docs.aws.amazon.com/dynamodb/index.html https://docs.aws.amazon.com/ses/index.html

User Guide

  1. Sign into Facebook. For this application to work, you must allow access for permissions to your Facebook pages. Additionally, you must be an admin of a Facebook page.
  2. Enter your details. You must have a message, the page you want to post to, and the time you wish the message to be posted. Optionally, you may include an image.
  3. Click submit. Your post will be live soon!