node-ainzfb-new 1.6.2729-test → 1.6.2810-test
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +1 -1
- package/src/getUserID.js +4 -3
- package/utils.js +2 -1
package/package.json
CHANGED
package/src/getUserID.js
CHANGED
@@ -41,10 +41,10 @@ module.exports = function (defaultFuncs, api, ctx) {
|
|
41
41
|
path: "/home.php",
|
42
42
|
request_id: utils.getGUID()
|
43
43
|
};
|
44
|
-
|
44
|
+
|
45
45
|
defaultFuncs
|
46
|
-
.
|
47
|
-
.then(
|
46
|
+
.get2("https://www.facebook.com/ajax/typeahead/search.php", ctx.jar, form)
|
47
|
+
.then(utils.parseAndCheckLogin(ctx, defaultFuncs))
|
48
48
|
.then(function (resData) {
|
49
49
|
if (resData.error) throw resData;
|
50
50
|
|
@@ -54,6 +54,7 @@ module.exports = function (defaultFuncs, api, ctx) {
|
|
54
54
|
})
|
55
55
|
.catch(function (err) {
|
56
56
|
log.error("getUserID", err);
|
57
|
+
console.log(err);
|
57
58
|
return callback(err);
|
58
59
|
});
|
59
60
|
|
package/utils.js
CHANGED
@@ -22,7 +22,8 @@ function getHeaders(url, options, ctx, customHeader) {
|
|
22
22
|
Origin: "https://www.facebook.com",
|
23
23
|
"User-Agent": options.userAgent,
|
24
24
|
Connection: "keep-alive",
|
25
|
-
|
25
|
+
"sec-fetch-site": 'same-origin',
|
26
|
+
"sec-fetch-mode": 'cors'
|
26
27
|
};
|
27
28
|
if (customHeader) Object.assign(headers, customHeader);
|
28
29
|
|