@dongdev/fca-unofficial 1.0.14 → 1.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -11,3 +11,6 @@ Too lazy to write changelog, sorry! (will write changelog in the next release, t
11
11
 
12
12
  ## v1.0.13 - 2025-04-28
13
13
  - Hotfix / auto bump
14
+
15
+ ## v1.0.14 - 2025-04-28
16
+ - Hotfix / auto bump
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dongdev/fca-unofficial",
3
- "version": "1.0.14",
3
+ "version": "1.0.15",
4
4
  "description": "A Facebook chat API without XMPP, will not be deprecated after April 30th, 2015.",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -36,7 +36,7 @@ module.exports = function (defaultFuncs, api, ctx) {
36
36
  resolveFunc(data);
37
37
  };
38
38
  }
39
- const form = {
39
+ var form = {
40
40
  queries: JSON.stringify({
41
41
  o0: {
42
42
  doc_id: "5009315269112105",
@@ -50,10 +50,11 @@ module.exports = function (defaultFuncs, api, ctx) {
50
50
  defaultFuncs
51
51
  .post("https://www.facebook.com/api/graphqlbatch/", ctx.jar, form)
52
52
  .then(utils.parseAndCheckLogin(ctx, defaultFuncs))
53
- .then(resData => {
53
+ .then(function(resData) {
54
54
  if (!resData || resData.error) {
55
55
  throw resData?.error || new Error("Unknown error from GraphQL API");
56
56
  }
57
+ console.log("getUserInfo", resData);
57
58
  const result = resData[0]?.o0?.data || null;
58
59
  if (!result) {
59
60
  console.error("getUserInfo", "Không nhận được dữ liệu hợp lệ!");