Skip to content

Commit 3448ceb

Browse files
committed
Simplifying the Graph API sample instructions
1 parent f8aabd1 commit 3448ceb

File tree

2 files changed

+7
-21
lines changed

2 files changed

+7
-21
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Graph API Webhooks Samples
22

3-
These are sample clients for [Facebook's Graph API Webhooks](https://developers.facebook.com/docs/graph-api/webhooks/) and [Instagram's Subscriptions API](https://www.instagram.com/developer/subscriptions/).
3+
These are sample clients for Facebook's [Webhooks](https://developers.facebook.com/docs/graph-api/webhooks/) product and Instagram's [Subscriptions API](https://www.instagram.com/developer/subscriptions/).
44

5-
1. [Heroku](heroku)
6-
1. [Hubot](hubot)
5+
1. [Heroku](heroku) - A sample client that receives Webhook events.
6+
1. [Hubot](hubot) - A script that messages a chat room when a Facebook Page post is published using Webhooks.

heroku/README.md

+4-18
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,20 @@
11
# Graph API Webhooks Heroku Sample
22

3-
This is a sample client for [Facebook's Graph API Webhooks](https://developers.facebook.com/docs/graph-api/webhooks/) and [Instagram's Subscriptions API](https://www.instagram.com/developer/subscriptions/), powered by [Node.js on Heroku](https://devcenter.heroku.com/articles/getting-started-with-nodejs).
3+
This is a sample client for Facebook's [Webhooks](https://developers.facebook.com/docs/graph-api/webhooks/) product and Instagram's [Subscriptions API](https://www.instagram.com/developer/subscriptions/), powered by [Node.js on Heroku](https://devcenter.heroku.com/articles/getting-started-with-nodejs).
44

55
## Setup
66

7-
### Facebook
8-
In order to use this sample app, you must have a [Facebook Developer](https://developers,facebook.com) account and a [Heroku](https://www.heroku.com) account.
7+
### Facebook Webhooks
98

109
1. Refer to Facebook's [Webhooks sample app documentation](https://developers.facebook.com/docs/webhooks/sample-apps) to see how to use this app.
1110
1. Deploy the sample app on Heroku with this button:
1211

1312
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/fbsamples/graph-api-webhooks-samples)
1413

15-
### Instagram
14+
### Instagram Subscription API
1615
1. Register an [Instagram API client](https://instagram.com/developer/clients/manage/).
1716
1. Deploy the sample app on Heroku with this button:
1817

1918
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/fbsamples/graph-api-webhooks-samples)
2019

21-
1. Enter a name for your app or let Heroku assign a random one. (The name of the app will become part of the callback URL.) Click **Deploy App**.
22-
1. After the app is deployed, click **Manage App** and select the **Settings** tab in the dashboard.
23-
1. Click **Reveal Config Vars**, and create a `APP_SECRET` [config var](https://devcenter.heroku.com/articles/config-vars) with your Facebook app's App Secret as the value. Then, create a `TOKEN` config var with whatever value you wish; this string is included in verification requests when you configure the Webhooks product in the App Dashboard (the app will validate the request on its own).
24-
25-
**Note:** It is recommended that you set a `TOKEN` config var as part of the set up of your Heroku app to secure requests. If you choose not to set a config var, then you will need to set a verify token of "token" when configuring the callback URL. The `APP_SECRET` config var is needed for handling `POST` request validation.
26-
27-
1. Set up your client's [subscription](https://www.instagram.com/developer/subscriptions/) using `https://<your-subdomain>.herokuapp.com/instagram` as the **Callback URL**. If you created a `TOKEN` config var enter it in the **Verify Token** field of the Webhook subscription settings.
28-
29-
## Testing
30-
If you wish to test that everything is working properly, you can send a test notification to your callback URL.
31-
32-
1. In the App Dashboard, go to **Products** > **Webhooks**.
33-
1. Click on a **Test** button for any of the Webhooks fields.
34-
1. A pop-up dialog will show you a sample response. Click **Send to My Server** to trigger the actual notification. You should see the Webhooks response at your callback URL in a web browser or by using `curl https://<your-subdomain>.herokuapp.com` from a terminal.
20+
1. Set up your client's [subscription](https://www.instagram.com/developer/subscriptions/) using your `https://<your-subdomain>.herokuapp.com/instagram` as the callback URL. It is recommended that you set a `TOKEN` [config var](https://devcenter.heroku.com/articles/config-vars) as part of the set up of your Heroku app to secure requests. If you choose not to set a config var, then you will need to set a verify token of 'token' when configuring the callback URL.

0 commit comments

Comments
 (0)