As Facebook users, we are in chat groups that rapidly gain 200+ new messages between us reading them. We wanted to read the interesting conversations, and skip the others.
How it works
Sum Chat scrapes the chat history of a specified group chat you are in. From the posts it hasn't read yet, SumChat accumulates all of the word frequencies. Then, it posts the highest words in the group chat for everyone to see.
It is able to summarize in two modes: periodic and on demand. The periodic mode summarizes the past x posts in the chat. The on demand mode summarizes the last 500 words from the chat log.
It also has shoutout integration. It reads other members mentions with the @ symbol, and tags the target user in the same group.
Challenges I ran into
Facebook Messenger API deprecated, phantomjs, parsing the Facebook DOM, learning about how to scrape, learning node.js, .
Accomplishments that I'm proud of
Our hack is able to read, write, and time responses appropriately in a Facebook chat. Additionally, we reached our goals we set for our hack this weekend. There are a lot of features to add on, but this is a MVP we are proud of.
What I learned
Megan: This was the first scraping project I have ever done. Because of that, I learned about how to determine where the interesting information is. I first tried to do this project in phantomjs => nightmarejs. That was the first time I worked on node.js and it was a good experience. But, when I found a good python Facebook sign-on solution through phantomjs, the ball really started to roll and I didn't look back. Through python, something I was familiar with, I was able to get into the depths of figuring out how to parse the DOM.
Hallie: I learned that you can post through a headless browser, despite the fact that Facebook's messaging API is deprecated.
What's next for SumChat
This bot can now be used to automate anyone's chat experience. This has much more potential than keeping this as just a chat summarizer. Some use cases We have brainstormed so far: Use the @replies to automatically start a private conversation with someone from the group. Automatically send a message to new members of a group you admin to welcome them, and moderating them. This could include sending a link to a reported post with a message about why it isn't appropriate.
The possibilities are endless for being able to receive information in a condensed way, and distribute it in a scaleable but personalized manner.