Skip to content

Commit

Permalink
Rename fb to facebook (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
kpman authored Dec 14, 2017
1 parent 18da173 commit 14bbf15
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 31 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2017-present Yoctol (github.com/bottenderjs/bottender-fb)
Copyright (c) 2017-present Yoctol (github.com/bottenderjs/bottender-facebook)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Bottender FB
# Bottender Facebook

[![npm](https://img.shields.io/npm/v/bottender-fb.svg?style=flat-square)](https://www.npmjs.com/package/bottender-fb)
[![Build Status](https://travis-ci.org/bottenderjs/bottender-fb.svg?branch=master)](https://travis-ci.org/bottenderjs/bottender-fb)
[![npm](https://img.shields.io/npm/v/bottender-facebook.svg?style=flat-square)](https://www.npmjs.com/package/bottender-facebook)
[![Build Status](https://travis-ci.org/bottenderjs/bottender-facebook.svg?branch=master)](https://travis-ci.org/bottenderjs/bottender-facebook)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

> Facebook connector for [Bottender](https://github.com/Yoctol/bottender).
## Installation

```sh
npm install bottender-fb
npm install bottender-facebook
```

## Requirement
Expand All @@ -34,7 +34,7 @@ You need to make sure the webhook of your page is subscribing to the `feed` fiel
```js
const { Bot } = require('bottender');
const { createServer } = require('bottender/express');
const { FacebookConnector } = require('bottender-fb');
const { FacebookConnector } = require('bottender-facebook');

// We can get `story_fbid` in URL query string
const POST_ID =
Expand Down Expand Up @@ -119,13 +119,13 @@ submit your pull requests:
Fork, then clone the repo:

```sh
git clone [email protected]:your-username/bottender-fb.git
git clone [email protected]:your-username/bottender-facebook.git
```

Install the dependencies:

```sh
cd bottender-fb
cd bottender-facebook
yarn
```

Expand All @@ -139,4 +139,4 @@ Make your changes and tests, and make sure the tests pass.

## License

MIT © [Yoctol](https://github.com/bottenderjs/bottender-fb)
MIT © [Yoctol](https://github.com/bottenderjs/bottender-facebook)
2 changes: 1 addition & 1 deletion examples/multi-pages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"dependencies": {
"bottender": "latest",
"bottender-fb": "latest",
"bottender-facebook": "latest",
"dotenv": "^4.0.0"
}
}
2 changes: 1 addition & 1 deletion examples/multi-pages/server.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { Bot } = require('bottender');
const { createServer } = require('bottender/koa');
const { FacebookConnector } = require('bottender-fb');
const { FacebookConnector } = require('bottender-facebook');

const PAGE_1_PAGE_ID = process.env.PAGE_1_PAGE_ID;
const PAGE_1_ACCESS_TOKEN = process.env.PAGE_1_ACCESS_TOKEN;
Expand Down
8 changes: 4 additions & 4 deletions examples/single-page/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

## Install and Run

Download this example or clone [bottender-fb](https://github.com/bottenderjs/bottender-fb).
Download this example or clone [bottender-facebook](https://github.com/bottenderjs/bottender-facebook).

```
curl https://codeload.github.com/bottenderjs/bottender-fb/tar.gz/master | tar -xz --strip=2 bottender-fb-master/examples/single-page
curl https://codeload.github.com/bottenderjs/bottender-facebook/tar.gz/master | tar -xz --strip=2 bottender-facebook-master/examples/single-page
cd single-page
npm install
npm run dev
Expand All @@ -14,7 +14,7 @@ npm run dev
You should fill your ACCESS_TOKEN, APP_SECRET, VERIFY_TOKEN, POST_ID in `server.js` before run your bot.

> Note: `POST_ID` is in the form of `${page_id}_${story_fbid}` and we can get `story_fbid` in URL query string.
`ACCESS_TOKEN` must have the following permission.
> `ACCESS_TOKEN` must have the following permission.
### User Permissions Required

Expand All @@ -29,7 +29,7 @@ Make sure your access token has the following permission.
There are two methods to subscribe page feed:

1. You can subscribe page feed at `developer app page` -> `Webhooks` -> `Page`.
And subscribe the `feed` and `message` fields.
And subscribe the `feed` and `message` fields.
2. Or you can just run `npm run subscribe`.

> Note: If you choose the 2nd method, make sure all your env in `subscribe.js` are well configured.
Expand Down
2 changes: 1 addition & 1 deletion examples/single-page/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"dependencies": {
"axios": "^0.17.1",
"bottender": "latest",
"bottender-fb": "latest",
"bottender-facebook": "latest",
"dotenv": "^4.0.0"
}
}
2 changes: 1 addition & 1 deletion examples/single-page/server.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { Bot } = require('bottender');
const { createServer } = require('bottender/koa');
const { FacebookConnector } = require('bottender-fb');
const { FacebookConnector } = require('bottender-facebook');

require('dotenv').config();

Expand Down
18 changes: 4 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
{
"name": "bottender-fb",
"name": "bottender-facebook",
"version": "0.3.1",
"description": "Facebook connector for Bottender.",
"main": "lib/index.js",
"keywords": [
"bottender",
"facebook",
"fb",
"connector"
],
"files": [
"lib"
],
"keywords": ["bottender", "facebook", "fb", "connector"],
"files": ["lib"],
"scripts": {
"build": "npm run clean && babel src -d lib --ignore __tests__",
"clean": "rimraf lib",
Expand Down Expand Up @@ -54,9 +47,6 @@
"rimraf": "^2.6.2"
},
"lint-staged": {
"*.js": [
"eslint --fix",
"git add"
]
"*.js": ["eslint --fix", "git add"]
}
}

0 comments on commit 14bbf15

Please sign in to comment.