Skip to content

Latest commit

 

History

History
9 lines (8 loc) · 1.03 KB

fb_storyinfo-js.md

File metadata and controls

9 lines (8 loc) · 1.03 KB
title date categories
Fb_storyInfo.Js
2023-11-23
useful-script-en

how to add bookmarklet in chrome
export default { icon: "", name: { en: "View Facebook Story information", vi: "View Facebook Story information", }, description: { en: "Get facebook story info", vi: "View story information", }, onClick: async function() { try { let storyId = UsefulScriptGlobalPageContext.Facebook.getStoryId(); let storyBucketId = UsefulScriptGlobalPageContext.Facebook.getStoryBucketIdFromStoryId( storyId ); if (!storyBucketId ) throw new Error("No story found."); let fb_dtsg = await UsefulScriptGlobalPageContext.Facebook.getFbdtsg(); let storyInfo = await UsefulScriptGlobalPageContext.Facebook.getStoryInfo( storyBucketId, fb_dtsg ); console.log(storyInfo); } catch (e) { alert("ERROR: " + e); } }, };