Skip to content

Commit

Permalink
Removed XOXO server code and added download link instead
Browse files Browse the repository at this point in the history
  • Loading branch information
britzl committed Apr 27, 2018
1 parent 1851e65 commit 70271c0
Show file tree
Hide file tree
Showing 9 changed files with 2 additions and 1,329 deletions.
17 changes: 0 additions & 17 deletions tictactoe-server/LICENSE

This file was deleted.

38 changes: 2 additions & 36 deletions tictactoe-server/README.md
@@ -1,36 +1,2 @@
# Instant Games Server Demo

This demo contains code that demonstrates common scenarios in a backend service that supports an Instant Game client: a game bot and a storage service.

## Pre-requisites
1. npm ([Install npm](https://docs.npmjs.com/cli/install))
1. Postgresql([Install Postgresql](https://www.postgresql.org/download/))


## Install Dependencies
```bash
$ npm install
```

## Configure environment variables
You can rename the file `template.env` into just `.env` and input test values of the variables below. This file will be used for local testing. When you host your code in the cloud, you'll need to reconfigure these variables to their production values.

1. `BOT_VERIFY_TOKEN`: create a memorable word. You'll use that to validate webhooks with your Messenger Bot
1. `APP_SECRET`: paste your App Secret. This can be found in your App's settings page.
1. `USE_SECURE_COMMUNICATION`: 1
1. `PAGE_ACCESS_TOKEN`: leave blank for now.
1. `DATABASE_URL`: connection string to your Postgres installation


## Create a Facebook page that will host your bot

1. Follow the instructions on the [Game Bot setup guide](https://developers.facebook.com/docs/games/instant-games/getting-started/bot-setup) to setup a Facebook page that will host your game bot
1. When associating the Webhooks, under the **Verify Token** field, input the memorable word you created for `BOT_VERIFY_TOKEN` above
1. Once webhooks are configured, copy your Page's access token into the `PAGE_ACCESS_TOKEN` environment variable of your hosted app.

All done! Your Backend service is configured!
You can run your code with

```bash
$ node index
```
# Instant Games server for XOXO example game
The XOXO example shipped with this extension supports game state persistence using both a server and the now deprecated Activity Store API. The server protocol is the same as that used by the official Facebook Instant Games example. Download the server code from the Instant Games Quickstart guide: https://developers.facebook.com/docs/games/instant-games/getting-started/quickstart
8 changes: 0 additions & 8 deletions tictactoe-server/app.json

This file was deleted.

138 changes: 0 additions & 138 deletions tictactoe-server/bot.js

This file was deleted.

16 changes: 0 additions & 16 deletions tictactoe-server/index.js

This file was deleted.

159 changes: 0 additions & 159 deletions tictactoe-server/matches.js

This file was deleted.

0 comments on commit 70271c0

Please sign in to comment.