Skip to content

Commit c8f3eba

Browse files
Jiaming Youmeta-codesync[bot]
authored andcommitted
Updated client JS MD file
Summary: Updated client JS MD file: marked processAndCollectAllParams as deprecated update all reference to processAndCollectAllParams Reviewed By: ppwang-sa Differential Revision: D98959753 fbshipit-source-id: 30b4d5dccf0bad56ef9e92e6b440fad98333f66c
1 parent e3c1749 commit c8f3eba

1 file changed

Lines changed: 8 additions & 13 deletions

File tree

client_js/README.md

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -44,38 +44,29 @@ Type the URL http://localhost:3000/?fbclid=test123 — you'll see `fbc` returned
4444

4545
## API Usage
4646

47-
### processAndCollectParams(url)
48-
49-
Processes and collects `fbc` and `fbp` parameters, saving them into cookies.
50-
51-
```javascript
52-
const params = clientParamBuilder.processAndCollectParams(url);
53-
```
54-
55-
- `url` is optional. Returns an object with `_fbc` and `_fbp` values.
56-
5747
### processAndCollectAllParams(url, getIpFn)
5848

59-
Extended version that also retrieves client IP addresses and backup click IDs from in-app browsers.
49+
Processes and collects `fbc` and `fbp` parameters (saving them into cookies), and also retrieves client IP addresses and backup click IDs from in-app browsers.
6050

6151
```javascript
6252
const params = await clientParamBuilder.processAndCollectAllParams(url, getIpFn);
6353
```
6454

6555
- `url` is optional.
6656
- `getIpFn` is optional — a user-provided function to retrieve client IP addresses.
57+
- Returns an object with `_fbc`, `_fbp`, and additional parameter values.
6758

6859
### getFbc()
6960

70-
Returns the `fbc` value from cookie. Call `processAndCollectParams` first.
61+
Returns the `fbc` value from cookie. Call `processAndCollectAllParams` first.
7162

7263
```javascript
7364
const fbc = clientParamBuilder.getFbc();
7465
```
7566

7667
### getFbp()
7768

78-
Returns the `fbp` value from cookie. Call `processAndCollectParams` first.
69+
Returns the `fbp` value from cookie. Call `processAndCollectAllParams` first.
7970

8071
```javascript
8172
const fbp = clientParamBuilder.getFbp();
@@ -100,6 +91,10 @@ const hashedPhone = clientParamBuilder.getNormalizedAndHashedPII('+1 (616) 954-7
10091

10192
Supported `dataType` values: `phone`, `email`, `first_name`, `last_name`, `date_of_birth`, `gender`, `city`, `state`, `zip_code`, `country`, `external_id`.
10293

94+
### processAndCollectParams(url) *(Deprecated)*
95+
96+
> **Deprecated:** Use `processAndCollectAllParams` instead. This method is kept for backward compatibility only.
97+
10398
## Development
10499

105100
### Prerequisites

0 commit comments

Comments
 (0)