@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 +3 -0
- package/package.json +1 -1
- package/src/getUserInfo.js +3 -2
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
package/src/getUserInfo.js
CHANGED
@@ -36,7 +36,7 @@ module.exports = function (defaultFuncs, api, ctx) {
|
|
36
36
|
resolveFunc(data);
|
37
37
|
};
|
38
38
|
}
|
39
|
-
|
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ệ!");
|