Skip to main content

Facebook Tools Box

Project description

FBToolsBox

Facebook Automation Tools
Author : Dapunta Khurayra X
Library : FBToolsBox
Release : 01/01/2024
Version : 0.0.1
Python : 3.10 - 3.12



Installation

pip install fbtoolsbox



Features

  1. Login via Cookie, Email, and Phone
  2. Get Access Token EAAG, EAAB, EAAD, EAAC, EAAF and EABB
  3. Get Information of Profile, Page, and Group
  4. Automation 1
  5. Change Privacy



Create Account

from FBTools.CreateAccount import CreateAccount

name = 'Input Your Name Here'
password = 'Input Your Password Here'
birthday = '25/12/1995' # DD/MM/YYYY
email = 'examplename@example.com'
gender = 1 # 1=Male, 0=Female
CA = CreateAccount()
CA.SetData(name=name, password=password, birthday=birthday, email=email, gender=gender)
CA.Create()

Parameter

name : Name You Want To Create (string, default=None)
password : Password You Want To Create (string, default=None)
birthday : Birth Date You Want To Set (string, default=None)
email : Email You Want To Register (string, default=None)
phone : Phone You Want To Register (string, default=None)
gender : Gender You Want To Set (bool, default=0 -> female)




Login

Parameter

cookie   = 'datr=nxbaxnynx; sb=axn...' # Input Your Cookie Here
email    = 'dapuntaxayonara@gmail.com' # Input Your Email Here
phone    = '6282245780524'             # Input Your Phone Here
password = 'satusampaidelapan'         # Input Your Password Here

Login With Cookie

from FBTools import Start
FB = Start(cookie=cookie)

Login With Email & Password

from FBTools import Start
FB = Start(email=email, password=password)

Login With Phone & Password

from FBTools import Start
FB = Start(phone=phone, password=password)



Get Access Token

Parameter

# Must Be Included
cookie  = 'Input Your Cookie Here'       # Cookie (string, default=None)

Token

from FBTools import Start
FB = Start(cookie=cookie)

TokenEAAG = FB.TokenEAAG()
TokenEAAB = FB.TokenEAAB()
TokenEAAD = FB.TokenEAAD()
TokenEAAC = FB.TokenEAAC()
TokenEAAF = FB.TokenEAAF()
TokenEABB = FB.TokenEABB()



Get Info Account, Page, Group

Parameter

# Must Be Included
cookie         = 'datr=nxbaxnynx; sb=axn...'     # Cookie (string, default=None)
target_profile = '100000198243102'               # ID/URL Profile Target (string, default=False)
target_page    = '100044426739616'               # ID/URL Page Target (string, default=False)
target_group   = '1824553201274304'              # ID/URL Group Target (string, default=False)

Get Info Profile

from FBTools import Start
FB = Start(cookie=cookie)

profile = FB.GetInfoProfile(target_profile)
print(profile.id)
print(profile.username)
print(profile.name)
print(profile.short_name)
print(profile.gender)
print(profile.work)
print(profile.education)
print(profile.current_city)
print(profile.hometown)
print(profile.relationship)
print(profile.birthday)
print(profile.language)
print(profile.website)
print(profile.github)
print(profile.instagram)
print(profile.friend)
print(profile.follower)

Get Info Page

from FBTools import Start
FB = Start(cookie=cookie)

page = FB.GetInfoPage(target_page)
print(page.id)
print(page.username)
print(page.name)
print(page.follower)
print(page.category)

Get Info Group

from FBTools import Start
FB = Start(cookie=cookie)

group = FB.GetInfoGroup(target_group)
print(group.id)
print(group.username)
print(group.name)
print(group.privacy)
print(group.membership)
print(group.admin)
print(group.moderator)
print(group.member)
print(group.new_member)
print(group.post_last_day)
print(group.post_last_month)
print(group.visibility)
print(group.history)
print(group.description)



Auto Post

Parameter

# Must Be Included
cookie  = 'Input Your Cookie Here'                           # Cookie (string, default=None)
text    = 'Hello! Test Bot Post'                             # Caption (string, default=None)
group   = '1824553201274304'                                 # Group ID (string, default=None)
# 'group' must include if post to group
# You must post at least 1 text or 1 photo

# Optional
url     = ['https://e.top4top.io/p_2916o42201.jpg']          # Picture URL (list, default=None)
tag     = ['1827084332','100000415317575','100000200420913'] # Friend ID You Want To Tag (list, default=None)
privacy = 1 # 1=Public, 2=Friends, 3=OnlyMe                  # Post Privacy (int, default=None)

Post To Feed

from FBTools import Start

FB = Start(cookie=cookie)
Post = FB.PostToFeed(text=text, url=url, tag=tag, privacy=privacy)

Post To Group

from FBTools import Start

FB = Start(cookie=cookie)
Post = FB.PostToGroup(group=group, text=text, url=url, tag=tag, privacy=privacy)

Return

{'status':'success','id':idpost,'message':None}
{'status':'pending','id':idpost,'message':'Pending Post'}
{'status':'failed','id':None,'message':'cookie invalid'}
{'status':'failed','id':None,'message':"Don't Create Same/Duplicate Post"}
{'status':'failed','id':None,'message':'Your Account Restricted To Post In Group'}
{'status':'failed','id':None,'message':'Terjadi Kesalahan'}



Auto Comment

Parameter

# Must Be Included
cookie = 'Input Your Cookie Here'                           # Cookie (string, default=None)
post   = 'Facebook.com/6929777330379375'                    # ID/URL Post Target (string, default=None)
text   = 'Hello! Test Bot Comment'                          # Caption (string, default=None)
# You must comment at least 1 text or 1 photo

# Optional
photo  = 'https://e.top4top.io/p_2916o42201.jpg'            # Picture URL (string, default=None)
tag    = ['1827084332','100000415317575','100000200420913'] # Friend ID You Want To Tag (list, default=None)

Comment To Post

from FBTools import Start

FB = Start(cookie=cookie)
Comment = FB.CommentToPost(post=post, text=text, photo=photo, tag=tag)

Return

{'status':'success','id':comment_id,'message':None}
{'status':'failed','id':None,'message':'cookie invalid'}
{'status':'failed','id':None,'message':'Spam Or Something Else'}
{'status':'failed','id':None,'message':'Terjadi Kesalahan'}



Auto React

Parameter

# Must Be Included
cookie = 'Input Your Cookie Here'                                   # Cookie (string, default=None)
post   = 'Facebook.com/6929777330379375'                            # ID/URL Post Target (string, default=None)
react  = 5 # 1=Like, 2=Love, 3=Haha, 4=Wow, 5=Care, 6=Sad, 7=Angry  # Reaction Type (int, default=2=Love)

React To Post

from FBTools import Start

FB = Start(cookie=cookie)
Reaction = FB.ReactToPost(post=post, react=react)

Return

{'status':'success','react_type':react_type,'message':None}
{'status':'failed','react_type':react_type,'message':'Spam Or Something Else'}
{'status':'failed','react_type':react_type,'message':'Terjadi Kesalahan'}



Auto Share

Parameter

# Must Be Included
cookie  = 'Input Your Cookie Here'                           # Cookie (string, default=None)
post    = 'Facebook.com/6929777330379375'                    # ID/URL Post You Want To Share (string, default=None)
group   = '1824553201274304'                                 # Group ID (string, default=None)
# 'group' must include if share to group

# Optional
text    = 'Hello! Test Bot Share'                            # Caption (string, default=None)
tag     = ['1827084332','100000415317575','100000200420913'] # Friend ID You Want To Tag (list, default=None)
privacy = 1 # 1=Public, 2=Friends, 3=OnlyMe                  # Share Privacy (int, default=None)

Share To Feed

from FBTools import Start

FB = Start(cookie=cookie)
Share = FB.ShareToFeed(post=post, text=text, tag=tag, privacy=privacy)

Share To Group

from FBTools import Start

FB = Start(cookie=cookie)
Share = FB.ShareToGroup(post=post, group=group, text=text, tag=tag, privacy=privacy)

Return

{'status':'success','id':idshare,'message':None}
{'status':'pending','id':idshare,'message':'Pending Post'}
{'status':'failed','id':None,'message':"Don't Create Same/Duplicate Post"}
{'status':'failed','id':None,'message':'post has been deleted or there is an error'}
{'status':'failed','id':None,'message':'Your Account Restricted To Post In Group'}
{'status':'failed','id':None,'message':'Terjadi Kesalahan'}



Change Privacy

Parameter

# Must Be Included
cookie  = 'Input Your Cookie Here'             # Cookie (string, default=None)
post    = '10217059556200871'                  # ID/URL Post  You Want To Change Privacy (string, default=None)
photo   = '10214228940637251'                  # ID/URL Photo You Want To Change Privacy (string, default=None)
album   = '146803788687013'                    # ID/URL Album You Want To Change Privacy (string, default=None)
privacy = 3 # 1=Public, 2=Friends, 3=OnlyMe    # Selected Privacy (int, default=3)

Post Privacy

from FBTools import Start

FB = Start(cookie=cookie)
Privacy = FB.PostPrivacy(post=post, privacy=privacy)

Photo Privacy

from FBTools import Start

FB = Start(cookie=cookie)
Privacy = FB.PhotoPrivacy(photo=photo, privacy=privacy)

Album Privacy

from FBTools import Start

FB = Start(cookie=cookie)
Privacy = FB.AlbumPrivacy(album=album, privacy=privacy)

Return

{'status':'success','id':id,'privacy':privacy,'message':None}
{'status':'failed','id':id,'privacy':None,'message':'Spam Or Something'}
{'status':'failed','id':None,'privacy':None,'message':'Something Went Wrong'}



Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fbtoolsbox-0.0.1.tar.gz (16.7 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page