开发者

Test Facebook App from Localhost

开发者 https://www.devze.com 2023-03-22 02:15 出处:网络
CanI use localhost to test the Facebook App. I have already tried with the following, but it comes up with no result.

Can I use localhost to test the Facebook App. I have already tried with the following, but it comes up with no result.

  1. I have tried with changing the windows host file which is under(path : c:/windows/system32/drivers/etc/), and then changing the httpd-vhosts.conf which you will find(path : xampp/apache/conf/extra/).

    I have changed my localhost to local.sitename i.e http://local.sitename/ using the above.

  2. Secondly, I tried use the following code

    $ch = curl_init();
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); 
    curl_setopt($ch, CURLOPT_SSL_VE开发者_StackOverflow中文版RIFYHOST, 2);
    

    to stop the SSL verification.

  3. Thirdly, I tried to put http://localhost:9000/ as call back url in Facebook App.

But I am getting the same error: SSL certificate problem.

Verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

Can anyone please help, I think localhost is the problem for testing facebook app, and note that I am working in cloud environment.

Could you please help me with testing my facebook app on localhost!

Thanks in advance.


If you check the Facebook Graph API where you register your app, it will show you what kind of url (domain) it will accept. Change your hosts file accordingly. I think it accepts only .com urls

0

精彩评论

暂无评论...
验证码 换一张
取 消