title | date | categories | |
---|---|---|---|
Fb_storyInfo.Js |
2023-11-23 |
|
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); } }, };