其他用户无法在本地主机上使用 facebook's api 登录 [英] Other users cant login using facebook's api on localhost

查看:65
本文介绍了其他用户无法在本地主机上使用 facebook's api 登录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在本地主机上使用 PHP SDK.我看过这里发布的其他问题,如下所示:无法使用facebook的api登录网站

I'm working with the PHP SDK on localhost. I've looked at other questions posted on here like this: Can't login to website using facebook's api's

域、网址、登录网址都匹配.应用程序机密和 id 匹配,沙箱从未打开(仔细检查以确保).我无法将它移到新的笔记本电脑上,因为我放入的文件夹被称为别的东西.在我更改后它工作正常.

Domains, urls, login urls all match. The app secret and id match, sandbox was never turned on (double checked to make sure). I had trouble moving it to a new laptop, cuz the folder i put it in was called something else. After i changed that it worked fine.

我遇到的问题是,作为应用程序的所有者,我可以登录并执行我想要的操作,但是如果我有朋友或其他用户尝试登录,它会要求获得权限,然后显示发生错误,请稍后再试"facebook 错误页面.不完全确定为什么要这样做,因为我根本没有将我的信息硬编码到其中.

The problem I'm having is, I as the owner of the app can log in and it does what i want it to do, but if i have a friend, or another user try to log in, it asks for permissions, then shows the "An error has occured, Please try later" facebook error page. Not entirely sure why its doing this, because i havn't hardcoded my info into it at all.

我使用了不同的浏览器,清除了 cookie,但似乎没有任何效果.任何想法都会有所帮助.

I've used different browsers, cleared cookies, nothing seems to work. Any ideas would be helpful.

我也试过在登录前销毁会话,没有帮助.

i've also tried destroying the session before login, didn't help.

谢谢.

推荐答案

如果其他人不使用您的计算机(本地主机),则他们无法在本地主机"上访问您的应用程序.

Other people cannot access your app 'on localhost' if they are not using your computer, which is the local host.

如果您希望其他人能够使用您的应用,他们需要一份您的代码副本,在他们的本地机器上运行,或者您需要通过可公开访问的 IP 和/或域使其可用名字.

If you want other people to be able to use your app, they'll need a copy of your code, running on their local machine, or you'll need to make it available via a publicly accessible IP and/or domain name.

这篇关于其他用户无法在本地主机上使用 facebook's api 登录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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