Fbthon

Latest version: v0.0.2

Safety actively analyzes 623360 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

0.0.2

Informasi Library
*Author :* [**Rahmat adha**](https://facebook.com/Anjay.pro098)\
*Library :* [**fbthon**](https://github.com/MR-X-Junior/fbthon)\
*License:* [**MIT License**](https://github.com/MR-X-junior/fbthon/blob/main/LICENSE)\
*Release:* **23**/04/20**23**\
*Version :* **0.0.2**

Apa Yang Baru?
Ada beberapa fitur baru yang saya tambahkan pada library fbthon, di antaranya:
- Mengirim komentar dengan foto
- Mengirim chat dengan foto
- Share Post
- Get Notifications
- Update Profile Picture
- Create a facebook account

Mengirim komentar dengan foto
Sekarang kamu bisa manambahkan foto pada komentar:)

Contoh
python
from fbthon import Facebook

fb = Facebook("datr=klr23aug21xxxxxxx") Cookie Akun Facebook
post = fb.post_parser('https://m.facebook.com/story.php?story_fbid=pfbid02kTobxSiD9buMUEjrq57FFnhQ6FJyGnafmNhMimoaamoAwuECAjboYaB6mE7C7pPZl&id=100053033144051&mibextid=Nif5oz')
post.send_comment("Komentar ini tidak di sertai dengan foto!")
post.send_comment("Komentar ini di sertai dengan foto!", file = "/sdcard/DCIM/Facebook/FB_IMG_1681559707400.jpg")

Hasilnya
![Contoh cara mengirim komentar dengan foto](https://i.ibb.co/6vd6BQc/IMG-20230418-110223.jpg)

Mengirim chat dengan foto
Kamu bisa menggunakan method `send_image` untuk mengirim chat dengan foto.

Contoh
python
from fbthon import Messenger

msg = Messenger("datr=klr23aug21xxxxxxx") Cookie Akun Facebook

with msg.new_chat("Anjay.pro098") as chat:
chat.send_text("Hallo kak "+chat.name)
chat.send_text("Pesan ini di kirim menggunakan library fbthon :)")
chat.send_image(file = "/sdcard/DCIM/Facebook/FB_IMG_1681559707400.jpg",message = "Aku ketika nunggu buka puasa : ")
chat.send_like_stiker()


Hasilnya
![Contoh Cara mengirim chat dengan foto](https://i.ibb.co/FVgZ7Mf/IMG-20230418-184806.jpg)

Share Post
Kamu bisa menggunakan method `share_post` membagikan postingan seseorang ke akun Facebook kamu.

Contoh (1)
python
fb = Facebook("datr=klr23aug21xxxxxxx") Cookie Akun Facebook
post = fb.post_parser("https://m.facebook.com/story.php?story_fbid=pfbid0gxnxN5dZDDA93S2GveyxqgSzEdYdAtdE32PYyAd7iftDS7yBHprBACc9VcFXDoPtl&id=100053033144051&mibextid=Nif5oz")
post.share_post()


Hasilnya
![Contoh cara membagikan postingan](https://i.ibb.co/F39c30w/IMG-20230419-064244.jpg)

Contoh (2)
Kamu juga bisa menambahkan `message`,`location` dan `feeling` pada postingan yang di bagikan.

python
from fbthon import Facebook

fb = Facebook("datr=klr23aug21xxxxxxx") Cookie Akun Facebook
post = fb.post_parser("https://m.facebook.com/story.php?story_fbid=pfbid0gxnxN5dZDDA93S2GveyxqgSzEdYdAtdE32PYyAd7iftDS7yBHprBACc9VcFXDoPtl&id=100053033144051&mibextid=Nif5oz")
post.share_post(message = "Postingan ini di bagikan menggunakan library fbthon", location = "Kuningan Timur", feeling = "Happy")


Hasilnya
![Contoh cara membagikan postingan dengan message,location, dan feeling](https://i.ibb.co/7J1wzB2/IMG-20230419-070541.jpg)

Get Notifications
Kamu bisa menggunakan method `get_notifications` untuk mendapatkan notifications.

Contoh
python
from fbthon import Facebook

fb = Facebook("datr=klr23aug21xxxxxxx") Cookie Akun Facebook

no = fb.get_notifications(limit = 2)

for chaa in no:
print ("Message : "+ chaa['message'])
print ("Time : "+ chaa['time'])
print ("Redirect URL : "+ chaa['redirect_url'] + "\n")


Output

Message : Berdasarkan halaman yang berinteraksi dengan Anda, Anda mungkin menyukai Meme Upin Ipin Comic Lucu.
Time : 11 Apr
Redirect URL : https://mbasic.facebook.com/a/notifications.php?redir=%2Fgroups%2F426298749190770%2F&seennotification=1681152051803754&eav=AfbWn5_N4XPZ0dL2bdBlHmCJIqmlGanPyx8_K3EuoQ47EREpeYdQtHn-1DmRfQaTNE0&gfid=AQDZ4pcYOl5JlPJd0uw&paipv=0&refid=48

Message : Berdasarkan halaman yang berinteraksi dengan Anda, Anda mungkin menyukai Mukbang Yummy Food.
Time : 8 Apr
Redirect URL : https://mbasic.facebook.com/a/notifications.php?redir=%2Fgroups%2F340989278132975%2F&seennotification=1680900355646527&eav=AfZlnRarakilRKNOhz6fPULFLUjDyccZvOhpJFhWEAy2un9H6EbgdPZ7Zii39UuMazc&gfid=AQBuf1_B6NbYKhXjCv8&paipv=0&refid=48


Update Profile Picture
Kamu bisa menggunakan function `UpdateProfilePicture` untuk mengganti poto profile akun Facebook kamu.

Contoh
python
from fbthon import settings
from fbthon import Facebook

fb = Facebook("datr=klr23aug21xxxxxxx") Cookie Akun Facebook

settings.UpdateProfilePicture(fb, photo = '/sdcard/DCIM/Orang-Susah.jpg')


Hasilnya

Before
![Before Update Profile Picture](https://i.ibb.co/tzpq34P/IMG-20230419-202908.jpg)

After
![After Update Profile Picture](https://i.ibb.co/wJCp0HD/IMG-20230419-203029.jpg)

Create a facebook account
Kamu bisa menggunakan class `CreateAccount` untuk membuat akun Facebook.

**CATATAN: Fitur ini masih dalam tahap percobaan, jadi kemungkinan besar fitur ini tidak akan bekerja dengan baik.**

Contoh
Di bawah ini adalah program sederhana untuk membuat akun Facebook.

python
from fbthon import CreateAccount

print ("[+] Daftar Akun Facebook [+]\n")

firstname = input("[?] Nama Depan : ") Nama Depan
lastname = input("[?] Nama Belakang : ") Nama Belakang
email = input("[?] Email/Phone : ") Alamat email / No Hp
gender = input("[?] Jenis Kelamin(Male/Female): ") Gender
ultah = input("[?] Tanggal Lahir (DD/MM/YYYY): ") Tanggal lahir
password = input("[?] Password : ") Kata Sandi

new_account = CreateAccount(firstname = firstname, lastname = lastname, email = email, gender = gender, date_of_birth = ultah, password = password)

print ("\n[+] Masukkan Kode Verifikasi yang sudah di kirim ke "+ email)
kode = input("[?] Kode Verifikasi : ")

Method `confirm_account` akan mengembalikan `True` Jika berhasil mengkonfirmasi akun.
konfir = new_account.confirm_account(kode)

if konfir:
print ("[✓] Berhasil Membuat Akun Facebook :)\n")
print ("[+] Nama Akun : %s %s" % (firstname,lastname))
print ("[+] ID Akun : %s" % (new_account.get_cookie_dict()['c_user']))
print ("[+] Email/Phone : %s" % (email))
print ("[+] Jenis Kelamin : %s" % (gender))
print ("[+] Tanggal lahir : %s" % (ultah))
print ("[+] Password : %s" % (password))
print ("[+] Cookie Akun : %s" % (new_account.get_cookie_str()))
print ("[+] Token Akun : %s" % (new_account.get_token()))
sys.exit(0)
else:
print ("[!] Gagal Membuat Akun Facebook ")
sys.exit(1)


Jalankan Program nya
![Menjalankan script Contoh cara membuat akun Facebook menggunakan library fbthon](https://i.ibb.co/2Sd19Wc/Screenshot-2023-0420-093249.png)

Hasilnya
Ini adalah akun yang di buat menggunakan library fbthon:)

![Ini adalah akun Facebook yang di buat menggunakan library fbthon](https://i.ibb.co/7K3q3hj/Screenshot-20230420-093826.jpg)

**Full Changelog**: https://github.com/MR-X-junior/fbthon/compare/0.0.1...0.0.2

0.0.1

**Full Changelog**: https://github.com/MR-X-junior/fbthon/commits/0.0.1

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.