Check Facebook application from localhost

Is it possible to use localhost to test the Facebook application. I already tried with the following, but it has no result.

  • I tried changing the Windows host file that is under (path: c: / windows / system32 / drivers / etc /) and then changing the httpd-vhosts.conf you find (path: XAMPP / Apache / CONF / additional /) .

    I changed my localhost to local.sitename ie http: //local.sitename/ using the above.

  • Secondly, I tried using the following code

    $ch = curl_init(); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); 

    to stop SSL checking.

  • Thirdly, I tried putting http: // localhost: 9000 / as the return URL in the Facebook application.

But I get the same error: SSL certificate issue.

Verify that the CA certificate is in order. Details: error: 14090086: SSL procedures: SSL3_GET_SERVER_CERTIFICATE: certificate verification completed

Someone can help, I think localhost is a problem for testing facebook application, and note that I work in a cloud environment.

Could you help me with testing my facebook application on localhost!

Thanks in advance.

+6
source share
1 answer

If you check the Facebook API in which you register your application, it will show you what type (domain) it will accept. Modify the hosts file accordingly. I think it only accepts .com URLs

-1
source

Source: https://habr.com/ru/post/893238/


All Articles