Facebook应用程序开发程序开发、Facebook

2023-09-02 09:42:42 作者:净莲散人

我一直都开发了使用本地MAMP我的项目,一旦做了简单的上传一切活动服务器。不过,我想融入我的当前项目的一些FB的功能,我相信我正确地说,这是不可能完全测试FB整合本地。我的问题是,我不希望释放,直到它完成我的工作项目(或至少接近尾声了!),将其置于一个活的服务器上。我甚至不希望别人看到一个登录屏幕或任何东西。有没有一种方法可以让我从我访问该网站上传的一切对我进行测试的目的,但prevent有人域分开?

I have always developed my projects using MAMP locally and once done simply uploaded everything to a live server. However, I'm wanting to integrate some FB functionality in my current project and I believe I'm correct in saying that it is not possible to fully test FB integration locally. My problem is I don't want to release the project I'm working on until it's finished (or at least nearly finished!) by placing it on a live server. I don't even want people to see a login screen or anything. Is there a way I can upload everything to my domain for testing purposes but prevent anyone apart from me from accessing the site?

推荐答案

它可以测试几乎一切(含相当罕见的例外),以FB本地相关的。

It is possible to test almost everything (with quite rare exclusions) related to FB locally.

唯一的例外我记得有:

附件来流消息 订阅

顺便说一句,如果有另外一个问题,我忘了,你正在经历 - 你可以创建一个测试域,例如的.htaccess 在其根目录:

Btw, if there are another issues I forgot and you're experiencing - you can create test domain with such .htaccess in its root:

Order deny,allow
Deny from all
AuthName "Password"
AuthType Basic
AuthUserFile /path/to/.htpasswd
Require valid-user

Allow from 69.63.176.0/20
Satisfy Any

其中, 69.63.176.0/20 等于 69.63.176.0 - 69.63.191.255 属于Facebook和 htpasswd的与控制台实用程序创建一个密码文件的htpasswd

Where 69.63.176.0/20 equals to 69.63.176.0 - 69.63.191.255 and belongs to facebook and .htpasswd is a password file created with console utility htpasswd

htpasswd -c /path/to/.htpasswd musoNic80 // and enter password after

通过这种的.htaccess 大家有人用Facebook的知识产权,除了会被要求输入有效的登录/密码槽基本HTTP认证。

With such .htaccess everyone except of someone with facebook IP will be required to enter valid login/pass trough basic http auth.

另外,如果你有动态的,但你自己的IP(因为只有你,一旦你登录您的PPPoE(或者任何你使用)会议,和之后的变化重新登录) - 你可以用 http://no-ip.org 和你的本地主机被外界相通的,可以为Facebook这样。

Also, if you have dynamic but your own IP (given to only you once you logged in your pppoe (or whatever you use) session, and changes after you re-logged in) - you could use http://no-ip.org and have your local host to be shared outside, and available for facebook thus.

 
精彩推荐
图片推荐