modify facebook link
This commit is contained in:
1 parent
098bcff5a4
commit
ac446758b6
2 files changed
+3
-8
No files matched your search
@@ -19,7 +19,7 @@ const getLastPost = async (pageid = '') => {
|
||||
console.log('access facebook fan page :::: ' + pageid)
|
||||
let page = await new Promise((resolve) => {
|
||||
request({
|
||||
baseUrl: 'https://facebook.com',
|
||||
baseUrl: 'https://www.facebook.com',
|
||||
url: `/${encodeURIComponent(pageid)}/posts`,
|
||||
method: 'get',
|
||||
headers: {
|
||||
@@ -95,7 +95,7 @@ const getLastPost = async (pageid = '') => {
|
||||
return b.time - a.time
|
||||
})
|
||||
let post = posts[0]
|
||||
post.link = `https://facebook.com/${post.link.replace(/^\//, '')}`
|
||||
post.link = `https://www.facebook.com/${post.link.replace(/^\//, '')}`
|
||||
return post
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user