From 8bd3d0720c05d01aed79707011bbf7e292e286d2 Mon Sep 17 00:00:00 2001 From: Erik Arvidsson Date: Sat, 8 Oct 2016 10:14:09 -0700 Subject: [PATCH] Update the instructions for fb/slurp (#2686) --- samples/js/fb/slurp/src/main.js | 24 ++++++++++++++---------- samples/js/package.json | 3 ++- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/samples/js/fb/slurp/src/main.js b/samples/js/fb/slurp/src/main.js index 7a3ea35ab8..92a600493c 100644 --- a/samples/js/fb/slurp/src/main.js +++ b/samples/js/fb/slurp/src/main.js @@ -19,18 +19,22 @@ import { newStruct, Struct, } from '@attic/noms'; +import {stripIndent} from 'common-tags'; const args = argv - .usage( - 'Parses photo metadata from Facebook API\n\n' + - 'Usage: node . --access-token= [--exchange-token | ]\n\n' + - 'Create an access token as follows:\n' + - '1. Browse to https://developers.facebook.com/tools/explorer/\n' + - '2. Login with your Facebook credentials\n' + - '3. In the "Get Token" dropdown menu, select "Get User Access Token"\n' + - '4. Copy the Access Token from the textbox\n' + - '5. (optional) Exchange the "short-lived" token from (4) for a long-lived one:\n' + - ' node . --access-token= --exchange-token') + .usage(stripIndent` + Parses photo metadata from Facebook API + + Usage: node . --access-token= [--exchange-token | ] + + Create an access token as follows: + 1. Browse to https://developers.facebook.com/tools/explorer/ + 2. Login with your Facebook credentials. + 3. Select "AtticIO Photo Importer" in the "Application" drop down. + 4. In the "Get Token" dropdown menu, select "Get User Access Token". + 5. Copy the Access Token from the textbox. + 6. (optional) Exchange the "short-lived" token from (5) for a long-lived one: + node . --access-token= --exchange-token`) .option('access-token', { describe: 'Facebook API access key', type: 'string', diff --git a/samples/js/package.json b/samples/js/package.json index e4d4161a2d..d839934ff0 100644 --- a/samples/js/package.json +++ b/samples/js/package.json @@ -25,6 +25,7 @@ "babylon": "^6.11.1", "chai": "^3.5.0", "classnames": "^2.1.3", + "common-tags": "^1.3.1", "csv": "^1.1.0", "flickr-oauth-and-upload": "^0.8.0", "flow-bin": "^0.32.0", @@ -34,8 +35,8 @@ "mz": "^2.4.0", "node-fetch": "^1.5.2", "oauth": "^0.9.14", - "react-dom": "^15.2.0", "react": "^15.2.0", + "react-dom": "^15.2.0", "request": "^2.72.0", "varint": "^4.0.0", "yargs": "^4.7.1"