简体   繁体   中英

how to configure facebook api in localhost in xampp or wamp server? what is php.ini settings requirement to use it?

I m new to use of facebook api after some googling i found facebook api from this link: https://github.com/facebook/facebook-php-sdk

after download this package i try to execute example code from this package but it returns an error like: Fatal error: Uncaught CurlException: 6: Could not resolve host: graph.facebook.com; Host not found thrown in D:\\xampp\\htdocs\\testing\\phpdemo\\fb\\src\\base_facebook.php on line 994

to solve this problem i try too much googling but i doesnt get positive result from there.

If anybody know what kind of possibilities for this problem then please help.

From my experience you can't use facebook APi local, however they have a free host provider,Heroku, try it. Also don't forget to replace YOUR_APP_ID and YOUR_APP_SECRET with your app Data.

here is may be two posibilities like: 1) Do you have any firewalls? The problem is not about configuration is just CURL can't do requests to graph.facebook.com and possible any website. Try disable any firewalls that may be blocking your CURL requests

2) From my experience you can't use facebook APi local, however they have a free host provider,Heroku, try it. Also don't forget to replace YOUR_APP_ID and YOUR_APP_SECRET with your app Data.

You can get help here, https://stackoverflow.com/questions/16294630

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM