I am receiving a 502 error page when I test my button on my facebook business page

Using Cloudflare Pages or by what?
I am afraid Cloudflare currently does not provide hosting services so far.

Furthermore, I am seeing error 520 rather than 502 - difference:

Regarding Cloudflare 520 error, may I suggest you to try looking into below articles to troubleshoot the issue:

Here is a way to re-check if you correctly setup the SSL for your domain with Cloudflare:

If any other issues appear, follow the needed steps for troubleshooting from article below:

Regarding available SSL options at Cloudflare dashboard, check here:

In case you do not have an SSL certificate, you can use Cloudflare SSL, if so, kindly make sure you follow the instructions as follows on the below article to setup an SSL certificate using Cloudflare CA Origin Certificate:

Last but not least, kindly have a look here for more information regarding correct SSL settings:

Ports list compatible and supported when using :orange: cloud (proxy mode) on Cloudflare can be found here:

Furthermore, kindly re-check if Cloudflare is allowed to connect to your origin host to as follows in the below article:

Nevertheless, Cloudflare IP addresses list can be found here: