Can't login to website using facebook's api's

对着背影说爱祢 提交于 2019-12-25 07:57:55

问题


I have some php code which worked nicely on my old server. I have moved the php code to a new server, and now I can no longer use the facebook api's to log into my site using a facebook login.

Here is a screenshot of what happens on the new server:

Larger version here.

I have checked apache's error.log file and I see no error messages.

Why would this be happening on a new server?


回答1:


There are many reasons for this

  • check that domains match in code and in settings
  • check that urls match in code and in settings
  • check that login urls for authentication match
  • check that the app secret has not changed
  • check that sandbox mode is off
  • check for access of app from a developer account and not a testing account
  • check if the url you are taking the user to, has all the required data.



回答2:


If it’s moving environments (i.e. from testing to live) then it’ll be your site URLs. Go to your app’s settings page at http://developers.facebook.com/apps/ and update your site URL in there.




回答3:


It shouldn't have anything to do with apache, please add some parts of your code. Also are you sure about the canvas url and app ID setting with your new server?




回答4:


go to apps >> your App >> edit app See if the url provided is correct

check if the appId and appSecret are correct




回答5:


check your site url at app setting while it contains proper server protocol like http:// or https://



来源:https://stackoverflow.com/questions/13413334/cant-login-to-website-using-facebooks-apis

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!