fbchat-dev / fbchat-dev/fbchat

Send a message based on the title of the marketplace post

Open
#557 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.2k
Forks
403
PR merge metrics
No merged PRs in 30d

Description

```python
import fbchat
from fbchat.models import *

class EchoBot(fbchat.Client):
def onMessage(self, author_id, message_object, thread_id, thread_type, **kwargs):
print("{} from {}".format(message_object, thread_id))
if message_object.text == "POST TITLE":
self.send(Message(text="hello...."), thread_id=thread_id, thread_type=thread_type)

bot = EchoBot(“user”, “pass”)
bot.listen()
```

So basically this is echobot example. The problem is that when someone texts me in for a marketplace post, I have to give a different answer based on the product
From the listening in the terminal I see this type of chat as a group and asap the chat is opened the thread title gets changed to the name of the product. Now, where is this name stored? How can I parse if it's the text i'm looking for to give a certain answer? Thanks for the help.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.