Facebook API网站网址

问题描述:

我的网站的用户管理完全通过facebook登录完成.而且我已经在Facebook应用程序中将站点URL指定为sitename.com.但是,当以www infront作为www.sitename.com来访问该站点时,facebook API无法正常工作.但是,如果我将Facebook应用程序中的站点URL更改为www.sitename.com,则可以正常运行.有办法解决吗?

My website's user management is totally done via facebook login. And I've specified the site URL as sitename.com inside the Facebook app. However, when the site is visited with www infront as www.sitename.com, the facebook API fails to work. But if I change the site URL inside the Facebook app to www.sitename.com, it works perfectly. Is there a way to solve this?

有两种方法:

  1. 将所有流量从.htaccess中的www重定向到non-www
  2. 在Facebook应用程序设置中将www域添加到App Domains.
  1. Redirect all the traffics from www to non-www in .htaccess
  2. Add the www domain to App Domains, in facebook app settings.

查看更多:将非www重定向到.htaccess中的www Facebook应用程序中的应用程序域是什么?