Facebook development in localhost

2019-01-02 19:25发布

Just wanted to know if there is any way I could develop Facebook applications in localhost.

18条回答
笑指拈花
2楼-- · 2019-01-02 19:53

Here is my config and it works fine for PHP API:

app domain

   http://localhost

Site URL

   http://localhost:8082/
查看更多
大哥的爱人
3楼-- · 2019-01-02 19:53

I just discovered a workaround: You can make your local machine accessible by using http://localtunnel.com . You'll need to (temporarily) change some URLs used in your app code / html so links point to the temporary domain, but at least facebook can reach your machine.

查看更多
只若初见
4楼-- · 2019-01-02 19:56

this works June 2018, even after the HTTPS requirement. It appears a test app does not require https:

create a test app: https://developers.facebook.com/docs/apps/test-apps/

then within the test app, follow the simple steps in this video: https://www.youtube.com/watch?v=7DuRvf7Jtkg

查看更多
情到深处是孤独
5楼-- · 2019-01-02 19:58

Try this ---

https://www.facebook.com/help/community/question/?id=589302607826562

1 - Click Apps and then select your app.

2 - Click the Settings button on the left side of the screen.

3 - In the Basic settings, click the Add Platform button below the settings configuration.

4 - Select Website in the platform dialog.

5 - Enter your URL (localhost works here).

6 - In the App Domains text input, add your domain that matches the one in the URL.

7 - Save your settings.

查看更多
深知你不懂我心
6楼-- · 2019-01-02 20:01

Of course you can, just add the url localhost (without "http") in your app_domain and then add in your site_url http://localhost (with http)

Update

Facebook change the things a little now, just go to the app settings and in the site url just add http: //localhost and leave the App Domain empty

查看更多
皆成旧梦
7楼-- · 2019-01-02 20:03

I think you should be able to develop applications using the visual studio development web server: Start a new FaceBook application on: http://www.facebook.com/developers/. Then set the settings for the site Url and the canvas url to the running instance of your website for example:http://localhost:1062/

Here are a couple of links that should help you out on starting with FaceBook:

  1. http://thinkdiff.net/facebook/graph-api-iframe-base-facebook-application-development/,
  2. http://nagbaba.blogspot.com/2010/05/experiencing-facebook-javascript-sdk.html,
  3. http://apps.facebook.com/thinkdiffdemo/

Hope this helps.

查看更多
登录 后发表回答