How to connect ChatGPT to Facebook Messenger | Facebook Messenger | ChatGPT | NodeJS

Поделиться
HTML-код
  • Опубликовано: 11 дек 2024

Комментарии • 149

  • @HPDecals
    @HPDecals Год назад +1

    Great video demonstrating how to interface these APIs. I used to be a developer in Windows environment (from 1998-2005) and our distributed API projects were implemented with DCOM Objects that we wrote in C++. I also did alot of front end web development so I learned Javascript fluently. I am very glad I learned Javascript because it is making it much easier to learn these newer API technologies. I have subscribed to your channel. Thank you very much for helping me learn more about these advanced API integration techniques. I plan to get back into development so I can be CTO in my own AI Startup. Good luck to you my friend!

    • @rajkkapadia
      @rajkkapadia  Год назад

      I appreciate your kind words and good luck to you as well for the new adventure...

  • @MiguelTorres-dw1nb
    @MiguelTorres-dw1nb Год назад +1

    thanks Good video greetings from Latin America Peru 🇵🇪👋

  • @kratijain2851
    @kratijain2851 Год назад +1

    how can I now add this bot to a messenger group? what permissions would I need and can a 'page' get them?

  • @dankrianki3207
    @dankrianki3207 Год назад +1

    i have the same issue at min 14:00 but idk how fix it

    • @rajkkapadia
      @rajkkapadia  Год назад

      I guess watching it again will help...

  • @eduardobrigham
    @eduardobrigham Год назад +1

    @raj Kapadia how can we get the text streaming functionality we see on the OpenAI ChatGPT chat window?

    • @rajkkapadia
      @rajkkapadia  Год назад +1

      You need to build a websocket for this...

  • @heritokyandriantsoa
    @heritokyandriantsoa Год назад +1

    Thanks so much for this amazing video, it really helps . Anyway, visual studio is needed here? to get the code to paste?

  • @realtun3741
    @realtun3741 8 месяцев назад +1

    you saved my day, tks u

  • @ybellones
    @ybellones Год назад +1

    Thank you very much! I was able to make it to work but with some minor changes in the code. Again, thank you!

  • @schnauzeprincessin
    @schnauzeprincessin Год назад +1

    Amazing how fast you find fixes for your problems.

  • @JeiiBee
    @JeiiBee Год назад +1

    Sir when I try to run the homeRoute it says that the module cannot found, I dunno why

  • @NeelNafiz
    @NeelNafiz Год назад +1

    Bro plz help me to connect callback url

  • @eemmkkaa2
    @eemmkkaa2 Год назад +1

    Error
    The callback URL or verify token couldn't be validated. Please verify the provided information or try again later.
    help why?

  • @GenStackAI
    @GenStackAI Год назад +1

    great video you explain everything in details thanks sir

  • @Junham35
    @Junham35 Год назад +1

    Hi, i just use your new upload code and it work perfectly, but chatbot doesnt remember full conversation. So i have an idea that we save all conversation in google sheet, then in promt, we ask chatbot use data form that sheet to continous the conversation. Is it possible? And Thank you very much.

  • @JeiiBee
    @JeiiBee Год назад +1

    sIR WHEN I ren the homeRoute the module cannot found what should I do I followed your steb by step procedure

    • @rajkkapadia
      @rajkkapadia  Год назад

      I am going to update the code for this repository, you can check after two to three days...

  • @iantembo9343
    @iantembo9343 Год назад +1

    Hey thank for the video, I am having trouble when I execute the code

    • @rajkkapadia
      @rajkkapadia  Год назад

      I suggest, please watch the video again...

  • @Reflection1919
    @Reflection1919 Год назад +1

    So what can I do for that?
    TypeError: Configuration is not a constructor
    at Object. (/home/runner/OpenAiFbMes/helper/openaiApi.js:4:23)
    at Module._compile (node:internal/modules/cjs/loader:1159:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
    at Module.load (node:internal/modules/cjs/loader:1037:32)
    at Module._load (node:internal/modules/cjs/loader:878:12)
    at Module.require (node:internal/modules/cjs/loader:1061:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object. (/home/runner/OpenAiFbMes/routes/fbWebhookRoute.js:5:28)
    at Module._compile (node:internal/modules/cjs/loader:1159:14)

    • @rajkkapadia
      @rajkkapadia  Год назад

      You have an error when you initialise the Openai package...

  • @hii7018
    @hii7018 Год назад +1

    How can other people reply on my page and also reply by open ai

    • @rajkkapadia
      @rajkkapadia  Год назад +1

      Your Facebook application needs to be approved by Meta, once approved, everyone can interact with it...

  • @MiguelDiganchi
    @MiguelDiganchi Год назад +1

    Thank you very much! You are amazing!

  • @LeanOnMeFencePostRepair
    @LeanOnMeFencePostRepair Год назад +2

    great video brother! Do you know how to train the AI so it can only answer specific questions and document the responses it gets?

    • @rajkkapadia
      @rajkkapadia  Год назад +1

      I think that will be another video on my channel...

    • @tomdavidson4528
      @tomdavidson4528 Год назад +1

      @@rajkkapadia Yes, please. this is key

    • @sheikhxrehman8653
      @sheikhxrehman8653 Год назад +1

      @@rajkkapadia please create an video and guide us how can we train the AI for specific niche

    • @ImHandyman9
      @ImHandyman9 Год назад +1

      @@rajkkapadia Thanks I'm waiting the great video.

  • @cha.recamara
    @cha.recamara Год назад +1

    Hi sir. Even after adding the
    console.log(query);
    console.log(senderId);
    there is still an error and the page isn't responding to chats.
    How do I fix it?

    • @rajkkapadia
      @rajkkapadia  Год назад

      I suggest you watch the video again...

    • @cha.recamara
      @cha.recamara Год назад +1

      @@rajkkapadia Hi sir, I did everything again--following all the steps in the entire video. I still have the same errors.

    • @rajkkapadia
      @rajkkapadia  Год назад

      @@cha.recamara There must be a step you are missing, cause people are able to replicate this... I can provide help on freelance platforms, link is in the description...

    • @cha.recamara
      @cha.recamara Год назад

      @@rajkkapadia OMG, after the fifth time it's now working! Thank you so much, sir! ❤❤

    • @cha.recamara
      @cha.recamara Год назад +2

      The only issue I'm encountering right now is that my page only replies to 1 user

  • @samsuperman1988
    @samsuperman1988 Год назад +1

    Got up to 'edit callback url' fine, but this is not working for me like it's shown in the video. I'm doing it the exact same but it keeps giving me the error. Can someone please help?

    • @rajkkapadia
      @rajkkapadia  Год назад

      I suggest you watch the video again..

    • @samsuperman1988
      @samsuperman1988 Год назад +1

      @@rajkkapadia
      I have and watching it more isn't going to change something that isn't working.

    • @NeelNafiz
      @NeelNafiz Год назад

      Mine was same problem
      Which country you live in @raz

    • @sundaeyoutube524
      @sundaeyoutube524 Год назад +1

      after you out your url add "/facebook" to it

  • @GuitarAddict101
    @GuitarAddict101 Год назад +1

    Hi sir, after verifying the token, I cannot get the webhook URL. Am I missing something? Thanks in advance

  • @PixelPlayzzBG
    @PixelPlayzzBG Год назад +1

    Great work sir ❤

  • @laagtamel
    @laagtamel Год назад +1

    Hi Raj. this is very useful and thank you for sharing. however when I try to share my page on my friends to test it if they are working,. the Ai does not response to them. But It works fine to me.
    what could be the problem on this

    • @rajkkapadia
      @rajkkapadia  Год назад

      Your application needs to be approved...

  • @giedriustomasburachas9173
    @giedriustomasburachas9173 Год назад +1

    Thank you for such a high quality tutorial! I followed it an made thigs work, but only in my FB account (i/e/ using the chatbot app owner account), and it still does not work for other users. Any suggestions?

    • @rajkkapadia
      @rajkkapadia  Год назад +1

      I am glad that my work helped you, you need to get your app approved by Facebook so everybody can use it. I hope this helps...

    • @adwapi
      @adwapi Год назад +1

      @@rajkkapadia prossess ? or auto approve

  • @NeelNafiz
    @NeelNafiz Год назад +1

    Callback url not working.

  • @fruitypropper_3575
    @fruitypropper_3575 Год назад +1

    sorry mine is not working...
    i tried exactly like urs?
    get my acc verified and everything... 😓

    • @rajkkapadia
      @rajkkapadia  Год назад

      I suggest you watch the video again. This will help for sure...

  • @6aleromero449
    @6aleromero449 Год назад +1

    Really interesting sir. I want to know if a. I can do this without much code knowledge. B. My plan is to have chatgpt search for information on Facebook. Is that possible with the Facebook developer area? By the way, your channel is very interesting, I follow about twenty of these on Ai but what you show is very technical and helps a lot

    • @rajkkapadia
      @rajkkapadia  Год назад

      With a limited amount of knowledge it is tough to execute your idea...

    • @rajkkapadia
      @rajkkapadia  Год назад

      Also it will require a verified Facebook application...

    • @6aleromero449
      @6aleromero449 Год назад

      Thnks for your time sir, @@rajkkapadia

  • @gabshit1
    @gabshit1 Год назад +1

    Hey bro, thanks! However I'm getting this error: TypeError: Configuration is not a constructor
    at Object. (/home/runner/OpenAI-FBMessenger/helper/openaiApi.js:4:23)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object. (/home/runner/OpenAI-FBMessenger/routes/fbWebhookRoute.js:5:28)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)

    • @rajkkapadia
      @rajkkapadia  Год назад

      I will update the code, the latest Openai package has changed and it now doesn't work the way it used to .

  • @danle9942
    @danle9942 Год назад +1

    Currently, the GPT API requires payment for the use of an API key. Is there a way to obtain a free API key? Thank you.

    • @rajkkapadia
      @rajkkapadia  Год назад

      I am not sure there is a way to get a free API 🗝️...

    • @danle9942
      @danle9942 Год назад

      ​@@rajkkapadia :( Can you create a video about integrating a messenger with other generative AI models, not just ChatGPT? Thank u

  • @manahirafanomezana233
    @manahirafanomezana233 Год назад +1

    mine doesn't work can you give me a hands🥲🥲🥲 when i'm installing execute the application doesn't work

  • @PixelPlayzzBG
    @PixelPlayzzBG Год назад +1

    the code is not working please make another video fixing it❤❤❤

  • @jennibeemarbeda8805
    @jennibeemarbeda8805 Год назад +1

    Sir can you make another videos for those who can't run the code due to module not found. I followed all your step by step procedure but it's still not working.

    • @rajkkapadia
      @rajkkapadia  Год назад

      I am going to do it in the near future...

    • @jennibeemarbeda8805
      @jennibeemarbeda8805 Год назад

      @@rajkkapadia waiting for your update video sir about this issue. Thanks.

  • @juanporvan7541
    @juanporvan7541 Год назад +1

    Thank you.

  • @khardkras011
    @khardkras011 Год назад +1

    Sir when i say hi it will reply to "Please check openai API key." how to fix that problem sir?

    • @rajkkapadia
      @rajkkapadia  Год назад

      Provide the Openai API key in the secret section...

    • @khardkras011
      @khardkras011 Год назад

      @@rajkkapadia Sir I'm provide the openai api key in the secret section but it's not working. When I try to type the "create me an essay" it says "Please check openai API key." I hope you will fix the code sir. Thank you.

    • @realtun3741
      @realtun3741 8 месяцев назад

      @@khardkras011 let change model in openaiAPI.js to gpt-3.5-turbo

  • @lakitc4
    @lakitc4 Год назад +1

    Great video. Thank you for that. Could you please let me know if I could connect Instagram the same way or send a link to the instructions to create the chatbot for Instagram?

    • @rajkkapadia
      @rajkkapadia  Год назад +1

      I think you can do it the same way...

    • @lakitc4
      @lakitc4 Год назад +1

      @@rajkkapadia The App worked fine for me but then it didn't generate replies for others. I have also changed the App status to 'live' from 'development' but it still doesn't generate the responses. Is there an error in the logic? Really appreciate if you can help me here

    • @rajkkapadia
      @rajkkapadia  Год назад +1

      @@lakitc4 you need your application approved by Facebook...

    • @lakitc4
      @lakitc4 Год назад +1

      @@rajkkapadia Thank you once again for the prompt reply. Is there a separate method to submit for approval or do they do it automatically once I change the status to 'live'?

    • @rajkkapadia
      @rajkkapadia  Год назад +1

      @@lakitc4 you can always search more on this...

  • @its_SaikatBinIslam0
    @its_SaikatBinIslam0 Год назад +1

    I can't fix the last problem you have face pls help me

  • @IreneShum
    @IreneShum Год назад

    hello Raj, can you please help me I follow all your instruction, however when I end the message to the messenger, it didn't response anything to me. Do you do the 1:1 tutorial?Thank you!

    • @rajkkapadia
      @rajkkapadia  Год назад

      Hi, I provide 1:1 sessions, you can find my contact information in the description of this video...

  • @MuhammadFarisAli-u7g
    @MuhammadFarisAli-u7g Год назад +1

    You Can Make It More Advance Bard And 1000 Different Commands

  • @luckyvincentcudia9764
    @luckyvincentcudia9764 Год назад +1

    Its gave me an error pls help

  • @jairlegaspi9777
    @jairlegaspi9777 Год назад +1

    how to run it 24 hours?

    • @rajkkapadia
      @rajkkapadia  Год назад

      Just deploy it...
      ruclips.net/video/0BeYenl5BqQ/видео.html

  • @contractorstotal
    @contractorstotal Год назад +1

    Shell .loading...

  • @omarsamy-os
    @omarsamy-os Год назад +1

    Hi there! Impressive video. Appreciate the hard work. Is it feasible to incorporate a feature into this code to automatically generate replies when users commenting on the page?

    • @rajkkapadia
      @rajkkapadia  Год назад

      Yes, you can do that. But it will need a different setup as you have to subscribe for page comment as well and then post a comment from the code as well...

    • @omarsamy-os
      @omarsamy-os Год назад +1

      ​@@rajkkapadia I received the "feed" subscription from your page and it was functional when using the pipedream webhook receipt. However, when using your code and the callback URL provided by Replit, it only works for messaging in chat, not for posting comments. It would be incredibly kind of you if you could demonstrate what changes I can make in the code to make this work, or perhaps share a short video tutorial. Your generosity would be greatly appreciated.

    • @rajkkapadia
      @rajkkapadia  Год назад +2

      @@omarsamy-os would you consider joining my channel and I will happily record you a video on demand...

    • @omarsamy-os
      @omarsamy-os Год назад +1

      @@rajkkapadia Of course

    • @rajkkapadia
      @rajkkapadia  Год назад

      @@omarsamy-os consider the video coming this Monday...

  • @SalmanShah95
    @SalmanShah95 Год назад +1

    Nice

  • @ivanarmenioncotacte8961
    @ivanarmenioncotacte8961 Год назад +1

    Why is it only answering me?

    • @rajkkapadia
      @rajkkapadia  Год назад

      I am not sure...

    • @MarkJayQuinto-k4r
      @MarkJayQuinto-k4r Год назад +1

      Because it is not live yet, it only replies on testers and developers, request an app review to make it available for everyone.

  • @christianzgamingv2203
    @christianzgamingv2203 Год назад +1

    2023 not working bro :(

  • @mathewagustinbella
    @mathewagustinbella Год назад +1

    It only replies to me, doesn't respond to other users.

    • @mathewagustinbella
      @mathewagustinbella Год назад +1

      What permission should i request ? my current request is "pages_messaging - The pages_messaging permission allows your app to manage and access Page conversations in Messenger." and i am still waiting. Let me know what should i request so there would be no problem on my end. thank you

    • @rajkkapadia
      @rajkkapadia  Год назад

      You need your application to be approved by Facebook, once approved everyone can use it, though you can add test users...

    • @mathewagustinbella
      @mathewagustinbella Год назад +1

      @@rajkkapadia i don't get the process of getting approved please let me know how to submit an approval request

    • @mathewagustinbella
      @mathewagustinbella Год назад +1

      Let me know if you're going to make a tutorial about it

    • @rajkkapadia
      @rajkkapadia  Год назад

      @@mathewagustinbella I am sorry, I don't have any plan to record a video on this...

  • @r4ripon
    @r4ripon Год назад +1

    Why is it only answering me, not answering anyone else?

    • @rajkkapadia
      @rajkkapadia  Год назад +1

      You need your app to be approved by Facebook...

    • @r4ripon
      @r4ripon Год назад +1

      What to do to get it approved?

  • @NYARNAV
    @NYARNAV 11 месяцев назад +1

    Bro you got a typo in your code haha thats why there's soo many people says it shows error... And you literally can see it in the compiler how can these people be so blind?
    Btw nc video

    • @rajkkapadia
      @rajkkapadia  11 месяцев назад +1

      Thank you for pointing out...

    • @NYARNAV
      @NYARNAV 11 месяцев назад +1

      @@rajkkapadia no problem bro... But Literally these people can just fix the typo on their own😂

  • @lulzse3519
    @lulzse3519 Год назад +1

    it's doesn't reponse lol

  • @sonorouslee99
    @sonorouslee99 Год назад +1

    thank you but i still have the AxiosError: Request failed with status code 400 even after adding console.log(query) and console.log(senderId)

    • @rajkkapadia
      @rajkkapadia  Год назад +1

      You can fork the existing replit and provide the environment variables in the secret section and try to run it...

    • @abdullahalmamzdeny
      @abdullahalmamzdeny Год назад +1

      @@rajkkapadia i have the same problem i did all the things you did

    • @rajkkapadia
      @rajkkapadia  Год назад

      @@abdullahalmamzdeny Make sure you have added a webhook on Twilio...

    • @abdullahalmamzdeny
      @abdullahalmamzdeny Год назад +1

      @@rajkkapadia no i did it just I used own API

    • @rajkkapadia
      @rajkkapadia  Год назад

      @@abdullahalmamzdeny How you are receiving message on your code...

  • @ItsJims
    @ItsJims Год назад +1

    I received this error when I sending message. I just fonk your code in replit and add console.log(query); and the other one.
    AxiosError: Request failed with status code 400
    at settle (/home/runner/ChatAIFB/node_modules/axios/dist/node/axios.cjs:1900:12)
    at IncomingMessage.handleStreamEnd (/home/runner/ChatAIFB/node_modules/axios/dist/node/axios.cjs:2952:11)

    • @rajkkapadia
      @rajkkapadia  Год назад

      Make sure you have provided all the environmental variables...

    • @ImHandyman9
      @ImHandyman9 Год назад +1

      Same as me. Can you fix it?

    • @rajkkapadia
      @rajkkapadia  Год назад

      @@ImHandyman9 I suggest you watch the video again and this will sove the problem...

  • @seven853ai
    @seven853ai Год назад +1

    Why is it only answering me,
    not answering anyone else?

    • @rajkkapadia
      @rajkkapadia  Год назад

      Get your application approved by Facebook...

    • @mathewagustinbella
      @mathewagustinbella Год назад +1

      ​ @Raj Kapadia What permission should i request ? my current request is "pages_messaging - The pages_messaging permission allows your app to manage and access Page conversations in Messenger." and i am still waiting. Let me know what should i request so there would be no problem on my end. thank you

    • @rajkkapadia
      @rajkkapadia  Год назад +2

      @@mathewagustinbella messages and page_messaginf

    • @mathewagustinbella
      @mathewagustinbella Год назад

      @@rajkkapadia this is for App Review right? not for subscriptions because i believe for subscription there is two: messages and messaging_postbacks
      Then to allow other users we have to get approve at app review with permission: pages_messaging

    • @rajkkapadia
      @rajkkapadia  Год назад

      Yes, you need to subscribe to these two events...