如何在本地测试Facebook连接 [英] How to Test Facebook Connect Locally

查看:144
本文介绍了如何在本地测试Facebook连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用ASP.NET和Facebook Connect API。但是当我运行应用程序并按Connect按钮时,它返回到网站,而不是测试本地服务器( http:/ /localhost:xxxx/test.aspx
那么我如何在本地测试Facebook(即我可以如何更改回调url)?



打开 / etc / hosts (unix)或 C:\WINDOWS\system32\drivers\etc\hosts



如果您的域名是foo.com,请添加以下行:

  127.0.0.1 local.foo.com 

当您测试时,打开 local.foo.com 您的浏览器应该可以正常工作。


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) ?

解决方案

It's simple enough when you find out.

Open /etc/hosts (unix) or C:\WINDOWS\system32\drivers\etc\hosts.

If your domain is foo.com, then add this line:

127.0.0.1    local.foo.com

When you are testing, open local.foo.com in your browser and it should work.

这篇关于如何在本地测试Facebook连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆