本地开发 ASP.NET Facebook 应用程序
我四处搜索,发现很多建议都说要修改主机文件:
127.0.0.1 mydomainname.com
我已经这样做了,但我的实际站点 mydomainname.com 仍在使用。我还可以采取其他故障排除步骤吗?还有其他建议吗?
I've searched around and found a lot of advice saying to modify the hosts file as such:
127.0.0.1 mydomainname.com
I've done that, but my actual site at mydomainname.com is still being used. Any other troubleshooting steps I could take? Any other suggestions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
重新启动浏览器,尝试
ipconfig /flushdns
(我对 Windows DNS 缓存有点模糊,因此这可能会或可能不会有帮助)或重新启动计算机。除非你做了一些非常奇怪的事情,否则主机文件应该具有优先权,因此必须有东西缓存 DNS 结果。Restart your browser, try
ipconfig /flushdns
(I'm a bit hazy on Windows DNS caching so that may or may not help here) or restart your computer. Unless you've done something really weird, the hosts file should have priority, so something must be caching the DNS result.只需将画布地址设置为本地主机即可。除非您使用 FBML,否则它是有效的。请参阅http://fbgraph.computerbeacon.net/tutorial/section1/createnewapp.aspx 举个例子。
simply setup your canvas address as localhost. Unless you're using FBML, it works. See http://fbgraph.computerbeacon.net/tutorial/section1/createnewapp.aspx for an example.
只需将您的redirect_uri设置为本地主机地址,例如:
https://graph.facebook.com/oauth/authorize ?client_id={consumerKey}&redirect_uri=http://localhost:4403/Handshake
我在 Visual Studio 中设置了我的设置,根据是否选择调试或发布在 localhost 和实时 return_url 之间切换
Just make your redirect_uri your localhost address like:
https://graph.facebook.com/oauth/authorize?client_id={consumerKey}&redirect_uri=http://localhost:4403/Handshake
I have mine set up in visual studio to switch between localhost and live return_url's depending on whether debug or release is selected