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

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

问题描述

我正在使用localhost上的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的api登录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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