a confessions manager for Facebook confessions pages, allowing you to handle confession's posting and scheduling in a more organized way. click here to see screenshots
- Submitting confessions anonymously.
- Organizing confessions in convenient lists.
- Editing confessions before posting ( editor's comment, confession number ).
- Posting the confession directly using Facebook API.
- Schedule a single post for later publish.
- Create an auto time based scheduler for tagged confessions.
- Archiving deleted and posted confessions.
- Token based security for authentication.
- Full mobile compatibility.
- first make sure you have a Developer Account go Here and scroll down until you see a button saying Create Developer Account and click it.
- click next and for "as Which of the following best describes you?" choose Developer.
- then click Create You First App and name it as your page.
- after it's created it will redirect you to the app management page, on your left side go to Setting > Basic and in the Privacy Policy URL input box paste this:
https://www.privacypolicies.com/generic/?fbclid=IwAR2HttnlhNRWmfgZrd3aWGsaOF7FCe6p_RadxFTAH-68d2YXLxAmY9jU14M
and click Save Changes button on the bottom of the page. - now you need to verify yourself in order to get an app review ( required: passport, ID, driver license ).
- after you are verified you need to request permissions for manage_pages and publish_pages. and give them all the data they need to access and check the app ( url to the site, user and password ). you also need to record a video of how to you are using the permissions. ( feel free to contact me if you need help with this process ),
- after you got approved, on the top left you will see In development toggle, click it, Choose a Category > Businnes and Pages, and then click Switch Mode. the toggle should show Live now.
- go to Facebook's Graph API Explorer, and select your Facebook App from the list.
- press on Get Token and select Get User Access Token.
- add the following permissions from Events Group Pages:
- public_profile ( added automatically )
- manage_pages
- publish_pages
- click the Generate Access Token and copy the Access Token.
- go to Facebook's Access Token Debugger and paste the token, then click on Debug, scroll down and click on Extend Access Token, copy the new token.
- open a new tab and paste this:
https://graph.facebook.com/[Page_ID]?fields=access_token&access_token=[Token]- the Page ID is in the About section of your Facebook page.
- the Token is the extended one from the last step.
- ( no square brackets of course... )
- copy the "access_token" and That's the Access Token we will use.
If you don't have a MongoDB ready, you can get one for free here.
- sign up, create a free cluster, choose Cloud Provider & Region.
- after the cluster is created ( 1-3 minutes ) click connect on you new cluster ( Clusrter0 probably ).
- on Whitelist a connection IP address choose Add a Different IP Address, insert 0.0.0.0 and click Add IP Address
- insert a user name and a password and click on Choose a connection method.
- on the next page choose connect your application, copy the URI you received and remember to replace with the new user's password.
If you don't already have a GitHub account create on from here.
now click on the Fork button on the top right, now you should have a copy of this repository named Confessbook
Get the latest version of NodeJS from here, LTS version is recommended.
and run the command: $ npm install -g @angular/cli .
- Clone the repository
- Run the command:
$ npm ito install all the dependencies. - in the root repository create .env file. in fill it out like this:
PAGE_ID=104603479746871
ACCESS_TOKEN=XrHqlfuG1ZB8zsgE7kBvovwdIeSb0TZB9...
DB_URI=mongodb+srv://myuser:mypassword@cluster...
PORT=3000
ADMIN_PASSWORD=Aa123456
SECRET=secret1234
APP_NAME=Somethimg Confessions
INTRO=don't be shy just confess!
Values Explained:
| Key | Value |
|---|---|
| PAGE_ID | Your Facebook page ID |
| ACCESS_TOKEN | The last Token we generated |
| DB_URI | Connections string to the DB |
| ADMIN_PASSWORD | password for the Admin User |
| PORT | Port when running locally |
| SECRET | Random string to encrypt logging token |
| APP_NAME | The name of your page |
| INTRO | The message in the confession form |
Locally
- if it's the first time run the command:
$ ng buildbefore to build the Angular app, or$ ng build --prodto use the prod environment file. - run the command:
$ npm start. - can also run
$ ng servefor a more responsive debugging of the angular app. accessible on port 4200
Heroku Cloud Platform
- go to Heroku. sign up/in. ( if you sign up choose NodeJS as your Primary development language, and Other as Role )
- Create a new app, choose an App name and a region and click Create app.
- go to the Deploy tab and choose GitHub, connect and choose your new forked repository, Enable Automatic Deploys, but before you click Deploy Branch...
- go to Settings tab, click on Reveal Config Vars and add all the vars from the .env file ( except PORT ).
- go back to Deploy tab, scroll down and click Deploy Branch. after the build process is finished you can access the app by clicking Open app on the top right.
Please notice! Heroku gives only 550 hours per month. use this guide to maximize the usage.
http://your-app.domain + /
This is the route your confessors will access to send their confessions.
( it's compatible with both desktop and mobile browsers. )
http://your-app.domain + /login
You will be moved here automatically if you try to go to /manager
and only after the authentication you will be redirected there.
http://your-app.domain + /manager + /main
Here you can view all the pending confessions
click one one to expand and reveal all the confession.
you can edit it and add a comment before posting it.
or delete it which will move it to the archive.
also, you can schedule a confession for later publish by Facebook or add a custom tag and let our schedulers to post it in time.
http://your-app.domain + /manager + /scheduler
In this tab you can mannage all the available schedulers:
- Set a scheduler for auto posting confessions with a custom tag on fixed interval.
- View, edit and cancel posts that are scheduled by Facebook for later publish.
http://your-app.domain + /manager + /archive
Here you can view all the archived confessions, and restore them or completely delete them ( from Facebook too )
you can see when they were created and posted/deleted and by who.
there is a toggle on the top left to filter only the none-posted confession.