-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cors Error #106
Comments
Have you whitelisted your domain in your Facebook app following the official doc (https://developers.facebook.com/docs/messenger-platform/discovery/facebook-chat-plugin/#whitelist-the-domain-of-your-website)? |
Thanks, Brother,
Yes, I have white-listed my domain in the facebook
advance page messaging setting but still, I got the cors error when my
application run on the production server.
Regards,
Ranjit Das.
Dhaka, Bangladesh.
…On Mon, Jan 10, 2022 at 7:59 AM 吳東曄 Wu, Dung-Ie ***@***.***> wrote:
Have you whitelisted your domain in your Facebook app following the
official doc (
https://developers.facebook.com/docs/messenger-platform/discovery/facebook-chat-plugin/#whitelist-the-domain-of-your-website
)?
—
Reply to this email directly, view it on GitHub
<#106 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHQUU5WUBILYW35EAYAV3T3UVI4R3ANCNFSM5LRTVPTQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
same here |
🖐Hello everyone, I was also getting these error. I found that the pageId, I was using was wrong🤦♀️. These errors come only when your pageId is wrong or the domain is not whitelisted properly(I even tried with a ngrok url and it worked😵). So the steps which I followed were- 1)In buisness.facebook.com go to inbox from sidebar and select chat plugin.[https://i.stack.imgur.com/rDk5d.png] 2)Click on setup to add your domain. [https://i.stack.imgur.com/exOi2.png] 3)Pick a setup method(standard for react/nextjs) and setup chat plugin(add language, domain , copy code and paste it) [https://i.stack.imgur.com/hDArZ.png] 4)You can add multiple domains[https://i.stack.imgur.com/zGdgx.png] 5)You will get pageId already embedded[https://i.stack.imgur.com/iRT13.png] use this code and paste it in _document.js file in nextjs. and after deploying it will work perfectly. For any confusion please let me know. Thanks, Happy Coding ☺ |
same here... |
@bubuq3 I was also getting error with this library If you have any confusion, please check my previous message (I have added steps with Images) |
@Rupal-Malik-au9 Where am I supposed to copy this Messenger Chat Plugin Code in react/next.js app? |
Have you solved your problem?If you still faced Cors error , I can help
you. I faced a Cors error in one of my applications a month ago and I
figured it out myself.
…On Thu, Feb 17, 2022 at 2:56 PM Rupal Malik ***@***.***> wrote:
@bubuq3 <https://github.com/bubuq3> I pasted the code directly after body
tag in _document.js
[image: image]
<https://user-images.githubusercontent.com/60615457/154440381-4da3ac04-0910-4b78-b9a1-a28baa81dbf1.png>
—
Reply to this email directly, view it on GitHub
<#106 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHQUU5SK7F2OEUQWVTMBOZ3U3SZ4FANCNFSM5LRTVPTQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Would be nice if you share the solution here for all of us. Thank you! :) |
I had trouble with the same issue. Turns out you can't test it locally, even if you add your ip to the whitelisted domains. I was getting very frustrated with every answer being to just add your domain and check your ID! When I host my site locally, I get CORS errors and restricted access errors. I published my development website and whitelisted my development domain, and it worked right away. I believe it is because the plugin only supports HTTPS. |
I am Using react messenger-customer-chat package in my react application, it throws cors policy errors in the production server(Google compute engine VM Server). The error is something like below...
Access to XMLHttpRequest at 'https://www.facebook.com/plugins/customer_chat/facade_gating/?page_id=110801524801659&suppress_http_code=1' from origin 'http://34.71.47.125' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Any help or suggestion will be highly appreciated.
The text was updated successfully, but these errors were encountered: