File tree Expand file tree Collapse file tree 4 files changed +75
-0
lines changed Expand file tree Collapse file tree 4 files changed +75
-0
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "editor.defaultFormatter" : " esbenp.prettier-vscode" ,
3+ "editor.formatOnSave" : true ,
4+ "editor.formatOnPaste" : false ,
5+ "editor.codeActionsOnSave" : [" source.formatDocument" , " source.fixAll.eslint" ],
6+ "files.exclude" : {
7+ "**/.git" : true ,
8+ "**/.svn" : true ,
9+ "**/.hg" : true ,
10+ "**/CVS" : true ,
11+ "**/.DS_Store" : true ,
12+ "**/Thumbs.db" : true ,
13+ "**/node_modules" : true ,
14+ // "**/*.d.ts": true,
15+ "*.log" : true ,
16+ "**/*.lock" : true ,
17+ "**/*.lockb" : true ,
18+ "**/*node.json" : true
19+ },
20+ "[typescript]" : {
21+ "editor.defaultFormatter" : " vscode.typescript-language-features"
22+ },
23+ "[javascript]" : {
24+ "editor.defaultFormatter" : " vscode.typescript-language-features"
25+ },
26+ "[html]" : {
27+ "editor.defaultFormatter" : " vscode.html-language-features"
28+ }
29+ }
Original file line number Diff line number Diff line change @@ -264,6 +264,7 @@ const tabs = [
264264 s . fb_getTokenFfb ,
265265 s . fb_getTokenFacebook ,
266266 s . fb_getTokenBussinessLocation ,
267+ s . fb_getTokenMessage ,
267268 // s.fb_getTokenBusinessStudio,
268269 s . fb_getTokenCampaigns ,
269270 createTitle ( "--- Get ID ---" , "--- Lấy ID ---" ) ,
Original file line number Diff line number Diff line change 1+ export default {
2+ icon : `<i class="fa-solid fa-key fa-lg"></i>` ,
3+ name : {
4+ en : "Get fb token EAADo1 (messenger_for_android)" ,
5+ vi : "Lấy fb token EAADo1 (messenger_for_android)" ,
6+ } ,
7+ description : {
8+ en : "Get facebook access token from www.facebook.com" ,
9+ vi : "Lấy facebook access token từ trang www.facebook.com" ,
10+ } ,
11+ whiteList : [ "https://*.facebook.com/*" ] ,
12+
13+ onClick : function ( ) {
14+ try {
15+ let uid = / (?< = c _ u s e r = ) ( \d + ) / . exec ( document . cookie ) ?. [ 0 ] ;
16+ if ( ! uid ) {
17+ alert ( "Không tìm thấy uid trong cookie. Bạn đã đăng nhập chưa?" ) ;
18+ return ;
19+ }
20+ let dtsg = require ( "DTSGInitialData" ) . token || document . querySelector ( '[name="fb_dtsg"]' ) . value ,
21+ xhr = new XMLHttpRequest ( ) ,
22+ data = new FormData ( ) ,
23+ url = `https://www.facebook.com/dialog/oauth/business/cancel/?app_id=256002347743983&version=v19.0&logger_id=&user_scopes[0]=email&user_scopes[1]=read_insights&user_scopes[2]=read_page_mailboxes&user_scopes[3]=pages_show_list&redirect_uri=fbconnect%3A%2F%2Fsuccess&response_types[0]=token&response_types[1]=code&display=page&action=finish&return_scopes=false&return_format[0]=access_token&return_format[1]=code&tp=unspecified&sdk=&selected_business_id=&set_token_expires_in_60_days=false` ;
24+ data . append ( 'fb_dtsg' , dtsg ) ;
25+
26+ xhr . open ( "POST" , url , ! 0 ) ;
27+ xhr . onreadystatechange = function ( ) {
28+ if ( 4 == xhr . readyState && 200 == xhr . status ) {
29+ var a = xhr . responseText . match ( / (?< = a c c e s s _ t o k e n = ) ( .* ?) (? = \& ) / ) ;
30+ console . log ( xhr . responseText ) ;
31+ if ( a && a [ 0 ] ) {
32+ prompt ( "Token" , a [ 0 ] ) ;
33+ } else {
34+ alert ( "Failed to Get Access Token." ) ;
35+ }
36+ }
37+ } ;
38+ xhr . send ( data ) ;
39+ } catch ( e ) {
40+ alert ( "ERROR: " + e ) ;
41+ }
42+ } ,
43+ } ;
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import _test from "./_test.js";
44import fb_toggleLight from "./fb_toggleLight.js" ;
55import fb_getTokenBusinessStudio from "./fb_getTokenBusinessStudio.js" ;
66import fb_getTokenFacebook from "./fb_getTokenFacebook.js" ;
7+ import fb_getTokenMessage from "./fb_getTokenMessage.js" ;
78import fb_getUid from "./fb_getUid.js" ;
89import fb_getPageId from "./fb_getPageId.js" ;
910import fb_getGroupId from "./fb_getGroupId.js" ;
@@ -165,6 +166,7 @@ const allScripts = {
165166 fb_toggleLight : fb_toggleLight ,
166167 fb_getTokenBusinessStudio : fb_getTokenBusinessStudio ,
167168 fb_getTokenFacebook : addBadge ( fb_getTokenFacebook , BADGES . hot ) ,
169+ fb_getTokenMessage : fb_getTokenMessage ,
168170 fb_getUid : fb_getUid ,
169171 fb_getPageId : fb_getPageId ,
170172 fb_getGroupId : fb_getGroupId ,
You can’t perform that action at this time.
0 commit comments