无法使用Python发送FB消息?

时间:2019-06-30 21:26:10

标签: python python-3.x

当我执行 thread_id = client.uid 时,我可以向自己发送消息,但是当我键入要发送给的人的名字时,我收到一条巨大的错误消息。

在执行此操作时有效:(将其发送给自己)

from fbchat import Client
from fbchat.models import *

client = Client('email', 'password')
print('Own id: {}'.format(client.uid))

client.send(Message(text = 'Hello!'), thread_id=client.uid, thread_type=ThreadType.USER)



client.logout()

在执行此操作时不起作用:(应该将其发送给其他人)

from fbchat import Client
from fbchat.models import *

client = Client('email', 'password')
print('Own id: {}'.format(client.uid))

client.send(Message(text = 'Hello!'), thread_id='client name', thread_type=ThreadType.USER)



client.logout()

我收到此错误消息:

fbchat._exception.FBchatFacebookError: Error when sending request: Got 500 response

此外,有什么方法可以安全地执行此操作而不会锁定您的帐户?我的被​​锁了一点笑。如果有的话,这是测试Facebook安全系统的好方法,现在我可以放心,如果我受到攻击,他们会控制住它!让我知道是否存在可以编写的代码以防止自己被锁定。你们像往常一样摇滚。谢谢。

0 个答案:

没有答案
相关问题