facebook page notify v1.0
This commit is contained in:
@@ -16,11 +16,11 @@ const cheerio = require('cheerio')
|
||||
const getLastPost = async (pageid = '') => {
|
||||
if (typeof pageid !== 'string' || pageid.trim().length === 0) return null
|
||||
pageid = pageid.trim()
|
||||
|
||||
console.log('access facebook fan page :::: ' + pageid)
|
||||
let page = await new Promise((resolve) => {
|
||||
request({
|
||||
baseUrl: 'https://facebook.com',
|
||||
url: `/${pageid}/posts`,
|
||||
url: `/${encodeURIComponent(pageid)}/posts`,
|
||||
method: 'get',
|
||||
headers: {
|
||||
'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:62.0) Gecko/20100101 Firefox/62.0'
|
||||
|
||||
Reference in New Issue
Block a user