Skip to content

Commit

Permalink
fix: correctly pass access_token
Browse files Browse the repository at this point in the history
  • Loading branch information
amitevski committed May 17, 2016
1 parent e6a8b0c commit 9835562
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -40,7 +43,6 @@ function ctrl() {

```javascript
import {IBotSettings, , IBotController} from 'botframework';
import {BotController} from './bot_controller';

let botSettings: IBotSettings = {
fb: {
Expand Down
2 changes: 1 addition & 1 deletion src/facebook/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export class FacebookApi {
public getUserDetails(userId: number): Promise<IFacebookProfile> {
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));
Expand Down

0 comments on commit 9835562

Please sign in to comment.