简体   繁体   English

如何在xampp或wamp服务器的localhost中配置facebook api? 使用它的php.ini设置要求是什么?

[英]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 我在使用谷歌搜索后从以下链接中找到了Facebook api,这是我第一次使用facebook api: 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; 下载此程序包后,我尝试从该程序包执行示例代码,但它返回以下错误: 致命错误:捕获的CurlException:6:无法解析主机:graph.facebook.com; Host not found thrown in D:\\xampp\\htdocs\\testing\\phpdemo\\fb\\src\\base_facebook.php on line 994 在第994行的D:\\ xampp \\ htdocs \\ testing \\ phpdemo \\ fb \\ src \\ base_facebook.php中找不到主机

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. 根据我的经验,您不能在本地使用facebook APi,但是他们有免费的托管服务提供商Heroku,请尝试一下。 Also don't forget to replace YOUR_APP_ID and YOUR_APP_SECRET with your app Data. 同样不要忘记用您的应用数据替换YOUR_APP_ID和YOUR_APP_SECRET。

here is may be two posibilities like: 1) Do you have any firewalls? 这可能是两个类似的可能性:1)您有防火墙吗? The problem is not about configuration is just CURL can't do requests to graph.facebook.com and possible any website. 问题不在于配置,只是CURL不能对graph.facebook.com以及任何网站进行请求。 Try disable any firewalls that may be blocking your CURL requests 尝试禁用所有可能阻止您的CURL请求的防火墙

2) From my experience you can't use facebook APi local, however they have a free host provider,Heroku, try it. 2)根据我的经验,您不能在本地使用facebook APi,但是他们有免费的托管服务提供商Heroku,请尝试一下。 Also don't forget to replace YOUR_APP_ID and YOUR_APP_SECRET with your app Data. 同样不要忘记用您的应用数据替换YOUR_APP_ID和YOUR_APP_SECRET。

You can get help here, https://stackoverflow.com/questions/16294630 您可以在这里获得帮助, https://stackoverflow.com/questions/16294630

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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