Skip to content

This repository provides a guide and code samples for connecting Google's Bard AI to Facebook Messenger. By integrating these two powerful platforms, you can enhance your Messenger chatbots with advanced natural language processing capabilities offered by Google Bard AI.

License

Notifications You must be signed in to change notification settings

mashwishi/Google-Bard-AI-Integration-with-Facebook-Messenger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation



Logo

Reverse engineered Google Bard AI Integration with Facebook Messenger

This repository provides a guide and code samples for connecting Google's Bard AI to Facebook Messenger. By integrating these two powerful platforms, you can enhance your Messenger chatbots with advanced natural language processing capabilities offered by Google Bard AI.

Project Visitor Count


Contributors Forks Stargazers Issues MIT License

Introduction

The goal of this project is to leverage Google Bard AI, a state-of-the-art natural language generation model developed by Google, and integrate it with Facebook Messenger. By doing so, you can provide your Messenger chatbot with the ability to generate human-like responses and engage in more meaningful conversations with users.

Installation

To get started, follow these steps to set up the integration:

  1. Clone the repository to your local machine using the following command:
git clone https://github.com/mashwishi/Google-Bard-AI-Integration-with-Facebook-Messenger.git
  1. Install the required dependencies by running the following command:
npm install
  1. Rename to .env.sample to .env or .env.local then update it
#Bard Session
BARD_COOKIES=__Secure-1PSID=

#Proxy
PROXY_HOST=
PROXY_PORT=
PROXY_USERNAME=
PROXY_PASSWORD=

#Facebook
TOKEN=
VERIFY_TOKEN=<create-your-own-token-for-facebook-webhook-verification>
PAGE_ID=

#Required Port
PORT=5000

Google Setup

  1. Login to bard.google.com and get access
  2. Get __Secure-1PSID= using this Extension: Cookie Editor

Facebook Setup

  1. Login to Facebook Developer
  2. Create an app and select "Other"
  3. Select an app type to "Business" since you need Graph API and Messenger
  4. Fill out the app name, support email and makesure you have Business Account
  5. Now go to app settings then basic, Fill up: Privacy Policy URL, Icon, and Category to "Messaging"
  6. Now click "add product" select "Webhooks" and "Messenger"
  7. Go to "Messenger" > "Settings" then add your page where you want to use the chat bot
  8. Once page is created or added, click generate token copy it and paste it on enviroment file under "TOKEN="
  9. Create/Add a "Callback URL", Now you have to add your domain where the node project is hosted then add "/facebook"
#Example, Please make sure to add /facebook. This is a webhook
https://yourdomain.com/facebook
  1. Under Verify token, paste your created token make sure the "VERIFY_TOKEN" under your enviroment file is same.
  2. After successfully adding the webhook you will see a page ID under your page name copy it and paste it to "PAGE_ID="
  3. In "Webhooks" press edit > Subscription Fields, Select: messages, messaging_postbacks (You don't have to select version the api graph api do the work in the project)
  4. You're done!

Important Note

To allow other users to get access or respond from the bot make sure pages_messaging permision is approved by Facebook. It can be found at App Review > Permissions and Feature.

Built With

This section list of major things that we used to this project.

Javascript Google Node Facebook

Support this Project

GoogleBard - A reverse engineered API created by @PawanOsman.

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

About

This repository provides a guide and code samples for connecting Google's Bard AI to Facebook Messenger. By integrating these two powerful platforms, you can enhance your Messenger chatbots with advanced natural language processing capabilities offered by Google Bard AI.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published