From 983556231f7925bad34d38c93c0c88dee95cad53 Mon Sep 17 00:00:00 2001 From: Aco Mitevski Date: Tue, 17 May 2016 14:58:38 +0200 Subject: [PATCH] fix: correctly pass access_token --- README.md | 4 +++- src/facebook/api.ts | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ac75ee3..1c2557f 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,6 @@ +[![Build Status](https://travis-ci.org/amitevski/botframework.svg?branch=master)](https://travis-ci.org/amitevski/botframework) +[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release) + # Bot Framework Bot Framework allows you to write bots for Facebook Messenger. But it has been designed to allow integration of other bots. @@ -40,7 +43,6 @@ function ctrl() { ```javascript import {IBotSettings, , IBotController} from 'botframework'; -import {BotController} from './bot_controller'; let botSettings: IBotSettings = { fb: { diff --git a/src/facebook/api.ts b/src/facebook/api.ts index 5d128a6..f076695 100644 --- a/src/facebook/api.ts +++ b/src/facebook/api.ts @@ -38,7 +38,7 @@ export class FacebookApi { public getUserDetails(userId: number): Promise { return new Promise( (resolve: Function, reject: Function) => { request.get({ - url: `${BASE_API}/${userId}?fields=first_name,last_name,profile_pic,locale,timezone,genderaccess_token=${this.settings.fb.access_token}` + url: `${BASE_API}/${userId}?fields=first_name,last_name,profile_pic,locale,timezone,gender&access_token=${this.settings.fb.access_token}` }, (err, res, body) => { if (err) { console.log('facebook: could not get user from facebook', JSON.stringify(err, null, 2));