1 | import os |
2 | from pystyle import Write,Colors |
3 | try: |
4 | from time import sleep |
5 | import requests,threading,os |
6 | import pyfiglet, os |
7 | except: |
8 | os.system("pip install python-time") |
9 | os.system("pip install requests") |
10 | os.system("pip install threaded") |
11 | os.system("pip install pyfiglet") |
12 | |
13 | do = "\033[1;91m" |
14 | xanhbien = "\033[1;36m" |
15 | vang = "\033[0;33m" |
16 | hong = "\033[1;35m" |
17 | xanhduong = "\033[1;20m" |
18 | xanhla = "\033[1;32m" |
19 | xanh="\033[1;32m" |
20 | cam="\033[1;33m" |
21 | blue="\033[1;20m" |
22 | lam="\033[1;20m" |
23 | tim="\033[1;20m" |
24 | syan="\033[1;36m" |
25 | xnhac= "\033[1;96m" |
26 | den="\033[1;90m" |
27 | luc="\033[1;92m" |
28 | xduong="\033[1;94m" |
29 | trang="\033[1;97m" |
30 | den = "\033[1;90m" |
31 | luc = "\033[1;32m" |
32 | trang = "\033[1;37m" |
33 | red = "\033[1;31m" |
34 | do = "\033[1;31m" |
35 | vang = "\033[1;33m" |
36 | tim = "\033[1;35m" |
37 | lamd = "\033[1;20m" |
38 | lam = "\033[1;36m" |
39 | tim = "\033[35m" |
40 | hong = "\033[1;95m" |
41 | |
42 | |
43 | def clear(): |
44 | if os.name=='nt':os.system('cls') |
45 | else:os.system('clear') |
46 | |
47 | |
48 | clear() |
49 | uid = input(f'{luc}NHẬP ID BÀI VIẾT{trang}: ') |
50 | token_fb = input(f'{luc}NHẬP TOKEN CHỨA PAGE{trang}: ') |
51 | |
52 | clear() |
53 | def shareao(num): |
54 | getTokenPage = requests.get(f"https://graph.facebook.com/v12.0/me/accounts?fields=access_token&limit=999999999&access_token={token_fb}").json()['data'] |
55 | for tach in getTokenPage: |
56 | uid_page=tach['id'] |
57 | access_token_page=tach['access_token'] |
58 | buff = requests.post(f"https://graph.facebook.com/me/feed?link=https://www.facebook.com/{uid}&published=0&access_token={access_token_page}").text |
59 | if "error" in buff: |
60 | print(f'{luc}ID: {vang}{uid_page}{trang} | {xanhbien}SHARE THẤT BẠI') |
61 | else: |
62 | print(f'{luc}ID: {vang}{uid_page}{trang} | {xanhbien}SHARE THÀNH CÔNG') |
63 | |
64 | |
65 | |
66 | |
67 | while True: |
68 | t1 = threading.Thread(target=shareao, args=(10,)) |
69 | t1.start() |
70 | |
71 | sleep(0.1) |
72 | |