如何在本地测试 Facebook Connect [英] How to Test Facebook Connect Locally
问题描述
我使用 ASP .NET 和 Facebook Connect API.但是当我运行应用程序并按下连接按钮时,它返回到网站而不是测试本地服务器 (http://localhost:xxxx/test.aspx)那么我如何在本地测试 Facebook(即如何更改回调 url)?
I use ASP .NET and Facebook Connect APIs. but when I run the app and press Connect button it's return to the Website not to the test local server which is (http://localhost:xxxx/test.aspx) So how I can test Facebook locally (i.e How I can change the callback url) ?
推荐答案
当你发现时很简单.
打开 /etc/hosts
(unix) 或 C:WINDOWSsystem32driversetchosts
.
Open /etc/hosts
(unix) or C:WINDOWSsystem32driversetchosts
.
如果您的域是 foo.com,则添加以下行:
If your domain is foo.com, then add this line:
127.0.0.1 local.foo.com
在测试时,在浏览器中打开 local.foo.com
,它应该可以工作了.
When you are testing, open local.foo.com
in your browser and it should work.
这篇关于如何在本地测试 Facebook Connect的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!