Hi man... I'm following your great tutorial from the beginning and my aim in these days is to create a chat bot starting from an index.php on a blank website (everything is configured well with facebook webhook and the website). Actually my index.php is equal to yours php file at minute 12:00 (when you write the response on the txt file) but when i try to post a comment to my page the txt file is not generated and nothing is written on it as well... What the problem could be? Maybe facebook v2.12? Maybe something that i didn't install on my server for php?... Thank you so much anyway!
If you were trying to only send a response on a specific post, wouldn't you need to check if the post_id == "Insert value"? Otherwise, would the user get the message regardless of what post they commented on? For your example you checked if the user commented red or blue on that post. But what if you had another post and the user commented on that one. Will they still get that red/blue message you setup?
After completion of webhooks we are not getting feed link ,is there any reason why i am not able to get that link but we are getting leadgen link which is not usable to me so please suggest me what we have to do get that link feed.Initially means 1 month before i got feed link and retrieved comments also.
Thanks for the video. I have no idea why there is nothing written on text.txt when I comment on a post, however, it can log the data when I send message by massenger. I have tried to look for setting or testing method, but still cannot fix it. Could you help me?
Hi Can we create a similar bot that can be integrated in our private web page to communicate with facebook messenge? Please provide any refrence, it would be very helpfull to me.
Yes, you can create but it will take so much time to code it and get approved by Facebook. I would definitely suggest checking the services like ManyChat.
I am finding that if I have a callback URL in a directory as you have such as xyz.com/mybot then the php://input is always empty, and I have to host my callback url in the main directory of the domain, example, xyz.com - have you come across this issue?
Please could you check if it's still working or not, cuz I tried it yesterday and I get this error (Trying to get property 'object' of non-object) in the line of code (if ($data->object == "page")) and I check the value of $data it had no data Idk why data has no value.
Hello Senaid I'm Muhammad from Nigeria I'm really enjoying with your tutorials but I wanted to learn Python but you're don't have any video on that pls do some or full python course and I quest for your social media handles so that we can reach you privately. that Muhammad Nigeria!
awesome tutorial sir,thanq very much,after verify my callback url and verify token i didn't get feed and messanger,i got only one feild leadgen please help me
Thumb up because your tutorial was really useful. However I couldn't get it working, because (as far as I've seen) Facebook have restringed this functionality only for published apps, and the way to publish an app is quite stressful, I've to upload videos showing how I'm pretending to use my app and things like that. Regards
Thank you! Yes, after the latest updates in the Facebook API it's very challenging to get an app, and for most permissions, you will have to send videos to show how you're going to use that specific permission.
Can I add some update? There are so many apps today. As for me, I use a browser extension for automated messages on Facebook. It's called Cucomm, and I find it simple and convenient.
You can get more information about expiration time of your token on: developers.facebook.com/tools/debug/accesstoken/ Also, you can read more on how to get long lived access token here: developers.facebook.com/docs/facebook-login/access-tokens/expiration-and-extension/ Since I didn't talk about that in this video tutorial (I will have another one on that topic), it's better for you to read documentation and understand how it all works.
my page can't use subscribed_apps my version is v.5.0 but when i subscribed_apps?subscribed_feed it result success:true but when i comment post file_get_contents('php://input') not send any thing :'( sorry for my eng is bad.
Great tutorial Senaid, thanks a lot! Do you have a tutorial on how to batch requests to the Facebook API as they are very restrictive with their rate-limiting?
There is way too many things to change to explain in the comments and help you. I would definitely suggest that you find a tutorial that will show you how to do it.
Sir im your subscriber. .... I'm looking for how to show -new- label tag dynamically for fresh post like indeed.com has on fresh posts -new- text tag php ?
Very Nice video but in this video you are explained regarding comments under that particular page so here we are getting the comments but we are expecting messages under that page that means if you are doing any messsages to that page from other facebook account is it way to write those messages into log????Is it avialable or not sir,If avaialable please let me know how is the way to get the messages instead of comments
Thank you. Yes, it's possible to read messages, but you will need to have a little bit different approach and also will need different permissions like read_page_mailboxes, pages_messaging, pages_messaging_subscriptions etc. (all depends on what exactly you want). However, check Facebook docs to see how to do it (for now).
and permissions read_page_mailboxes, pages_messaging, pages_messaging_subscriptions already given as mentioned in the video instead of this can i need to give any extra permisssions to fetch messages
when i am going through our video i am getting comments in to my log file but i want messages for that one i tried through lot of videos but intially at 2 months it is working fine but suddenly from facebook site to our https site we are not getting any thing .Can you please out me to get messages back to my log file, for that one can you suggest any video like of this then we get more idea on this because i am gone through so many methods i am not getting message events..Sir Please can you do something for this?
Tutorial is helpful, i have my facebook page where we teach courses, many people inbox us for course inquiries i want to program a chat app where user ask some thing we reply with a drop down and ask there phone numbers or email and reply them course inquiries they ask for with its fee structure and class timimgs thankz for great tutorial,please suggest any thing for my question
Hi, why not make a video related to facebook chatbot with menu options something like IVR And Thanks a lot for the video... really helped me out Coding Passive Income Rocks !!
1. Find a link in the description of this video 2. Once you open the website, on the right side there will be blue "Download Source Code" button 3. Check your Facebook Messenger Inbox 4. Enjoy it!
When I put my link callback URL then I get this error "The URL couldn't be validated. Response does not match challenge, expected value="2092440891", received="\u003C?php if (isset($_G..."
I applied all that you explained in the video, but the code does not work! I think the problem is permission read_page_mailboxes . how to get permission read_page_mailboxes ? thnx
Hey, I know this has been here for a long time, but i am getting this error. { "error": { "message": "(#100) The parameter subscribed_fields is required.", "type": "OAuthException", "code": 100, "fbtrace_id": "D32l0y+6EOJ" } }
Look at this: github.com/kadnan/Facebook-Chat-Bot/blob/master/index.php Just strip down the message validation part and send a reply with what you need
{ "error": { "message": "(#200) Access to this data is temporarily disabled for non-active apps or apps that have not recently accessed this data due to changes we are making to the Facebook Platform. developers.facebook.com/status/issues/205942813488872/", "type": "OAuthException", "code": 200, "fbtrace_id": "E3/iKpzpFE1 " } } that is the erro we are getting when we goto forward cases please give me the suffcient solution for this
Thanks man, very helpful
It's my pleasure! :)
Great to see you back bro! :)
I dig the new glasses.
magicalbhakuni Thank you so much. A lot more tutorials comming soon. :)
Hi man... I'm following your great tutorial from the beginning and my aim in these days is to create a chat bot starting from an index.php on a blank website (everything is configured well with facebook webhook and the website).
Actually my index.php is equal to yours php file at minute 12:00 (when you write the response on the txt file) but when i try to post a comment to my page the txt file is not generated and nothing is written on it as well...
What the problem could be?
Maybe facebook v2.12? Maybe something that i didn't install on my server for php?...
Thank you so much anyway!
15:49 How can we get the access token instead of copying from graph api explorer?
If you were trying to only send a response on a specific post, wouldn't you need to check if the post_id == "Insert value"? Otherwise, would the user get the message regardless of what post they commented on? For your example you checked if the user commented red or blue on that post. But what if you had another post and the user commented on that one. Will they still get that red/blue message you setup?
Good video.
I want to receive notifications of new subscribers for selected page.
Which event to choose for webhook??
After completion of webhooks we are not getting feed link ,is there any reason why i am not able to get that link but we are getting leadgen link which is not usable to me so please suggest me what we have to do get that link feed.Initially means 1 month before i got feed link and retrieved comments also.
Thanks for the video.
I have no idea why there is nothing written on text.txt when I comment on a post, however, it can log the data when I send message by massenger. I have tried to look for setting or testing method, but still cannot fix it. Could you help me?
Hi Can we create a similar bot that can be integrated in our private web page to communicate with facebook messenge? Please provide any refrence, it would be very helpfull to me.
Yes, you can create but it will take so much time to code it and get approved by Facebook. I would definitely suggest checking the services like ManyChat.
@@SenaidBacinovic Thanks for replying. I am looking forward for any refrence fo that I can code according.
i still working this tutorial? because i was trying and i get error on submit the POST.
is this project part of machine learning , AI ?
How to use it in 2024? I want build php page notification / sent messager to me when i save a record to database, as telegram notifi to channel? Thank
Thanks so very helpful
I am finding that if I have a callback URL in a directory as you have such as xyz.com/mybot then the php://input is always empty, and I have to host my callback url in the main directory of the domain, example, xyz.com - have you come across this issue?
It can be some problem with your htaccess settings. Try to set URL that will go directly to the callback file.
I didn’t get any notifications. Btw does this code pattern still work!! Cuz current graph version is 8.0
Need your attention, Sir. 🙂
Boss, nice video never seeing before, thanks boss.
Thank you :)
Please could you check if it's still working or not, cuz I tried it yesterday and I get this error (Trying to get property 'object' of non-object) in the line of code (if ($data->object == "page")) and I check the value of $data it had no data Idk why data has no value.
I used 000webhost.com as web host to my php file
Hello Senaid I'm Muhammad from Nigeria I'm really enjoying with your tutorials but I wanted to learn Python but you're don't have any video on that pls do some or full python course and I quest for your social media handles so that we can reach you privately. that Muhammad Nigeria!
awesome tutorial sir,thanq very much,after verify my callback url and verify token i didn't get feed and messanger,i got only one feild leadgen please help me
Hi there, I tried the same but its not showing subscribed app success over there giving a blank array.
What a great video! Thank you!
My pleasure, thank you!
this is still work on 2022 ?
Excellent! Thank you so much!
My pleasure, thank you!
Thumb up because your tutorial was really useful. However I couldn't get it working, because (as far as I've seen) Facebook have restringed this functionality only for published apps, and the way to publish an app is quite stressful, I've to upload videos showing how I'm pretending to use my app and things like that. Regards
Thank you! Yes, after the latest updates in the Facebook API it's very challenging to get an app, and for most permissions, you will have to send videos to show how you're going to use that specific permission.
Boss, please up to date this video.
now it's not working!
or help me...
I try to send message when a new comment added. But nothing happened!
Can I add some update? There are so many apps today. As for me, I use a browser extension for automated messages on Facebook. It's called Cucomm, and I find it simple and convenient.
Hi bro, is the page access token going to get expired after a period of time? In case, if yes, how can we get a long life page access token? Thanks,
You can get more information about expiration time of your token on:
developers.facebook.com/tools/debug/accesstoken/
Also, you can read more on how to get long lived access token here:
developers.facebook.com/docs/facebook-login/access-tokens/expiration-and-extension/
Since I didn't talk about that in this video tutorial (I will have another one on that topic), it's better for you to read documentation and understand how it all works.
Thanks, I will and am looking forward to watch your tutorial on this topic.
Thank you!
my page can't use subscribed_apps my version is v.5.0 but when i subscribed_apps?subscribed_feed it result success:true but when i comment post file_get_contents('php://input') not send any thing :'( sorry for my eng is bad.
Great tutorial Senaid, thanks a lot!
Do you have a tutorial on how to batch requests to the Facebook API as they are very restrictive with their rate-limiting?
Thank you! I don't have, but I might create one, great idea! :)
Coding Passive Income Please do! It would be very useful for many others :)
Already in my notes! :)
how to do the same thing in laravel ? any suggestion please..
thanks in advance.
There is way too many things to change to explain in the comments and help you. I would definitely suggest that you find a tutorial that will show you how to do it.
thanks i just did that. :) .i got the notification response every time i comments . Thanks for awesome tutorial.
My pleasure, thank you!
Sir im your subscriber. ....
I'm looking for how to show -new- label tag dynamically for fresh post like indeed.com has on fresh posts -new- text tag php ?
Thank you! This tutorial might help you: ua-cam.com/video/D3Ieioouzbo/v-deo.html
Thanks for the video, really nice.
thank you :)
Very Nice video but in this video you are explained regarding comments under that particular page so here we are getting the comments but we are expecting messages under that page that means if you are doing any messsages to that page from other facebook account is it way to write those messages into log????Is it avialable or not sir,If avaialable please let me know how is the way to get the messages instead of comments
Thank you. Yes, it's possible to read messages, but you will need to have a little bit different approach and also will need different permissions like read_page_mailboxes, pages_messaging, pages_messaging_subscriptions etc. (all depends on what exactly you want). However, check Facebook docs to see how to do it (for now).
how can i goto check Facebook docs can you please show me the path
and permissions read_page_mailboxes, pages_messaging, pages_messaging_subscriptions already given as mentioned in the video instead of this can i need to give any extra permisssions to fetch messages
Please check this docs: developers.facebook.com/docs/messenger-platform/webhook/
when i am going through our video i am getting comments in to my log file but i want messages for that one i tried through lot of videos but intially at 2 months it is working fine but suddenly from facebook site to our https site we are not getting any thing .Can you please out me to get messages back to my log file, for that one can you suggest any video like of this then we get more idea on this because i am gone through so many methods i am not getting message events..Sir Please can you do something for this?
Tutorial is helpful, i have my facebook page where we teach courses, many people inbox us for course inquiries i want to program a chat app where user ask some thing we reply with a drop down and ask there phone numbers or email and reply them course inquiries they ask for with its fee structure and class timimgs thankz for great tutorial,please suggest any thing for my question
Thank you. The easiest way for you to do it is to just use software like ManyChat, ChatFuel etc.
can u show how with v3.1 feed
Hi, why not make a video related to facebook chatbot with menu options something like IVR
And Thanks a lot for the video... really helped me out
Coding Passive Income Rocks !!
can we have the code like this in instagram because i want to work on instagram comments and messages
I never did it, so I don't know. I guess you should dive into the Instagram API documentation and find out.
Subscribed ;)
Much thanks
Thank you so much! Appreciate the support. :)
It is not writing to the txt file here. Please help.
i can't see feed on webhook .this have only one leadgen.
Looking nice...
thank you :)
please update as of version 3.2 above 10:28 {
"error": {
"message": "(#100) The parameter subscribed_fields is required.",
"type": "OAuthException",
"code": 100,
"fbtrace_id": "A4k9w_EAl5i5oEz99XGzF6a"
}
}
me/subscribed_apps?subscribed_fields=leadgen
Why i get this error message guys!?
(#100) The parameter subscribed_fields is required.
how can i get a free domain and url to use as calll back
You can get one from: www.dot.tk
thanks bro
Thank you :)
Some of the aliases you requested do not exist: private_replies
How to download Source Code? Thanks!
1. Find a link in the description of this video
2. Once you open the website, on the right side there will be blue "Download Source Code" button
3. Check your Facebook Messenger Inbox
4. Enjoy it!
how to upload the php file ?
When I put my link callback URL then I get this error "The URL couldn't be validated. Response does not match challenge, expected value="2092440891", received="\u003C?php
if (isset($_G..."
Can you show me the code?
Sorry for my delay.
sure.but how?
Post here...
codingpassiveincome.com/facebook-messenger-bot-tutorial
Hello, post here
Kindly help me
@@kakolisaha981 I know what is your problem. PHP is not enabled on that server. It just receives a text, hence the "if (isset($_G..."
can't we make a facebook bot same as twitter bot?
THEWALKER ***** Can you explain a little bit more what do you think?
twitter bot that auto-Retweet some on facebook that auto comment
I have no idea what you are talking about?? :S
plz, how to fix read_page_mailboxes permission ??
Fix?
I applied all that you explained in the video, but the code does not work! I think the problem is permission read_page_mailboxes . how to get permission read_page_mailboxes ? thnx
or if you have an app to get valid access token with permission: read_page_mailboxes and manage_pages
@@وصفاتالأميرات it seems like in the bot app itself you forgot to check necessary permissions you need
Hey, I know this has been here for a long time, but i am getting this error.
{
"error": {
"message": "(#100) The parameter subscribed_fields is required.",
"type": "OAuthException",
"code": 100,
"fbtrace_id": "D32l0y+6EOJ"
}
}
Did u solve this one?
please take music off i cannot understand anything form your videos . thanks
The
music is the best part of this video
Great Informative Video bro
Look at this: github.com/kadnan/Facebook-Chat-Bot/blob/master/index.php
Just strip down the message validation part and send a reply with what you need
Thanks bro
Not working, did not generate the text.txt in my server
Can you show the code?
no longer works: /
{
"error": {
"message": "(#200) Access to this data is temporarily disabled for non-active apps or apps that have not recently accessed this data due to changes we are making to the Facebook Platform. developers.facebook.com/status/issues/205942813488872/",
"type": "OAuthException",
"code": 200,
"fbtrace_id": "E3/iKpzpFE1
"
}
}
that is the erro we are getting when we goto forward cases please give me the suffcient solution for this
Supperp bro
chathuranga manoj thank you :)
not working
Nice videos! how hard would it be to create a bot to message everyone on your friends list? #cryptodaddys
Thank you. It's impossible, they need to subscribe to your bot first.
@@SenaidBacinovic i dont have a bot tho what so i need to create a bot for my profile and have my friends sub to the bot? I dont understand.