XF 1.5 Facebook Integration

I am trying to setup facebook integration for my forums.
I created the App, I setup the ID and Key of the App in the forum settings area, I have the cURL and OpenSSl installed on my dedicated machine where I host the forums and I am ussing full SSL (cloudflare) with my Licensed Comodo certificate.

When I try to test the api I always get this error.

Your server could not connect to Facebook (https://graph.facebook.com). Try again later. If the issue persists, contact your host.
The problem was because of the machine that is hosting my forum had ipv6 enabled and it was trying to resolve the dns of facebook with an ipv6.