You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21-17Lines changed: 21 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,42 +11,46 @@ You can use this Sample App to test the [Threads API](https://developers.faceboo
11
11
12
12
In order to run the Sample App you will need to install some required software, as follows:
13
13
14
-
- Node JS
14
+
-Node JS
15
15
16
16
## Running the Sample App
17
17
18
18
Note: If you are using devcontainers, ensure that containers are enabled and supported by your IDE.
19
19
20
20
1. Install necessary tools
21
-
* If you are using a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers), skip to step 2.
22
-
* Install [nodeJS](https://nodejs.org/en/download/) to run the application. If you're using a Mac, you can install it via Homebrew: `brew install node`
23
-
* Install [mkcert](https://mkcert.org/) to create the OpenSSL Certificate. If you're using a Mac, you can install it via Homebrew: `brew install mkcert`
21
+
22
+
- If you are using a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers), skip to step 2.
23
+
- Install [nodeJS](https://nodejs.org/en/download/) to run the application. If you're using a Mac, you can install it via Homebrew: `brew install node`
24
+
- Install [mkcert](https://mkcert.org/) to create the OpenSSL Certificate. If you're using a Mac, you can install it via Homebrew: `brew install mkcert`
24
25
25
26
2. Run `npm install` in your terminal
26
27
27
28
3. Create a new file called `.env` and copy/paste all the environment variables from `.env.template`. Replace any environnment variables that have placeholders, such as APP_ID.
28
29
29
30
4. Map a domain to your local machine for local development
30
-
* Note: Threads apps do not support redirect URLs with using `localhost` so you must map a domain to test locally this Sample App.
31
-
* Map a new entry in your hosts file to the domain that you will use to test the Sample App e.g. `threads-sample.meta`.
32
-
* If you're using a Linux or Mac, this will be your `/etc/hosts` file.
33
-
* Add an entry like so:
31
+
32
+
- Note: Threads apps do not support redirect URLs with using `localhost` so you must map a domain to test locally this Sample App.
33
+
- Map a new entry in your hosts file to the domain that you will use to test the Sample App e.g. `threads-sample.meta`.
34
+
- If you're using a Linux or Mac, this will be your `/etc/hosts` file.
35
+
- Add an entry like so:
34
36
```
35
37
127.0.0.1 threads-sample.meta
36
38
```
37
-
* This will map threads-sample.meta to localhost, so you may visit https://threads-sample.meta:8000 to see the Threads Sample App.
38
-
* This domain must match the one defined in your `.env` file as the value of the `HOST` variable.
39
+
- This will map threads-sample.meta to localhost, so you may visit https://threads-sample.meta:8000 to see the Threads Sample App.
40
+
- This domain must match the one defined in your `.env` file as the value of the `HOST` variable.
39
41
40
42
5. Create an OpenSSL Cert
41
-
* OAuth redirects are only supported over HTTPS so you must create an SSL certificate
42
-
* `mkcert threads-sample.meta` - This will create pem files for SSL.
43
-
* You will see `threads-sample.meta.pem` and `threads-sample.meta-key.pem `files generated.
44
-
* If you are using a host that is different than `threads-sample.meta` then replace it with your specific domain.
43
+
44
+
- OAuth redirects are only supported over HTTPS so you must create an SSL certificate
45
+
- `mkcert threads-sample.meta` - This will create pem files for SSL.
46
+
- You will see `threads-sample.meta.pem` and `threads-sample.meta-key.pem `files generated.
47
+
- If you are using a host that is different than `threads-sample.meta` then replace it with your specific domain.
45
48
46
49
6. Run the Sample App
47
-
* Run `npm start` from the command line.
48
-
* Once the Sample App starts running, go to https://threads-sample.meta:8000 to test the workflow.
49
-
* If you are using a different domain or port then replace those values accordingly.
50
+
- Run `npm start` from the command line.
51
+
- Once the Sample App starts running, go to https://threads-sample.meta:8000 to test the workflow.
52
+
- If you are using a different domain or port then replace those values accordingly.
50
53
51
54
## License
55
+
52
56
Threads API is Meta Platform Policy licensed, as found in the LICENSE file.
0 commit comments