Test Facebook App from Localhost

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
shovanik
Forum Newbie
Posts: 1
Joined: Thu Jul 21, 2011 4:12 am

Test Facebook App from Localhost

Post by shovanik »

Hi Everybody,

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_VERIFYHOST, 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. Please suggest me, can i use LOCALHOST for testing Facebook App.

Thanks in advance.
Hermit TL
Forum Commoner
Posts: 69
Joined: Mon Nov 21, 2011 12:16 am

Re: Test Facebook App from Localhost

Post by Hermit TL »

The quickest way I can think of to start debugging this is to move your code to an online server (there a plenty of free webhosts to choose from) and point the callback url to that location, and see if it works properly. If it does or does not, you'll know if you should be looking at your machine or the code.
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: Test Facebook App from Localhost

Post by Celauran »

Alternately, you could forward port 80 to that machine and use your public IP address.
Hermit TL
Forum Commoner
Posts: 69
Joined: Mon Nov 21, 2011 12:16 am

Re: Test Facebook App from Localhost

Post by Hermit TL »

Alternately, you could forward port 80 to that machine and use your public IP address.
Yes, however, if there is a configuration problem is with that machine, it's going to (I think) act exactly the same. If you put it on a web hosting provider, more often than not, their machine is going to be configured properly all the time (it's in their best interest). And if it still comes up with the same error, you can be sure there is a pretty good chance the problem is in the code and not with some type of configuration issue.
epcheal
Forum Newbie
Posts: 2
Joined: Thu Dec 04, 2014 2:54 am

Re: Test Facebook App from Localhost

Post by epcheal »

I want to the answer of this same question. Can someone help me?
Post Reply