Facebook app domain name when using localhost

前端 未结 16 669
说谎
说谎 2020-12-07 13:18

From a tutorial here:
http://ankurm.com/blog/api/using-localhost-for-facebook-app-development/1091/

I tried to set up a Local development Area for my Facebook

相关标签:
16条回答
  • 2020-12-07 13:42

    It seems like the protocol has been changed.

    Here is my solution (I tested on 3rd April 2015 and it works well):

    In Settings -> Basic tab

    1. App Domain: localhost
    2. Click "+Add Platform" and choose "Website"
    3. Site URL: http://localhost:<port>/ (<port> is your port number)
    4. Save Changes
    0 讨论(0)
  • 2020-12-07 13:51

    Tossing one more solution into the mix:

    I set up my website per the instructions, then added a second app (Facebook Canvas) and set that URL to http://localhost:XXXXX. Now I can access FB both locally and in production.

    0 讨论(0)
  • 2020-12-07 13:52

    You can either leave it blank or use localhost, http://localhost:85/my_app/ is the URL

    0 讨论(0)
  • 2020-12-07 13:52

    https://ngrok.com

    Go through https://ngrok.com/ link to download ngrok and extract that file. Open cmd ( search cmd) Go to directory where ngrok is extracted. Open ngrok from command line ex: c:/ngrok/ngrok.exe [port] or cd c:/ngrok then ngrok 80 ( ngrok [port] ) You will get

    ngrok

    Tunnel Status                 online
    Version                       1.3/1.3
    Forwarding                    http://3ahsdfhska.ngrok.com -> 127.0.0.1:80
    Forwarding                    https://3ahsdfhska.ngrok.com -> 127.0.0.1:80
    Web Interface                 http://127.0.0.1:4040
    # Conn                        0
    Avg Conn Time                 0.00ms
    

    Don’t FORGET to make sure your wamp server is open on same port … (how to check -> goto->wampicon->apache->httpd.conf search for port or 80(default) use that for ngrok.exe 80 )

    http://3ahsdfhska.ngrok.com

    will be URL for accessing your localhost online

    0 讨论(0)
  • 2020-12-07 13:53

    This has changed some over the years, but I just got it to work with a webapp that I'm running on localhost. This is what I did:

    1. Goto https://developers.facebook.com/apps
    2. Select your app.
    3. Select Settings > Basic from the left hand nav bar.
    4. Click the Add Platform button at the bottom of the page.
    5. Click Website
    6. Enter http://localhost:8080/ for the Site URL.
    7. Click the Quickstart button to the far right of the Site URL you just entered.
    8. A new tab will open. On that tab, scroll down to the section, "Tell us about your website" and again enter http://localhost:8080/ for the Site URL.
    9. Click the Next button.
    10. Attempted to login again, and it worked this time.

    Good luck!

    0 讨论(0)
  • 2020-12-07 13:54

    I tested this and it works for me [Feb 2020]:

    1. Install ngrok & get your https url (example: https://a3asdf23.ngrok.io)
    2. Go to FB App Dashboard Settings (Basic) -> under App Domains -> add https://a3asdf23.ngrok.io, https://ngrok.io.
    3. On the same page, scroll all the way down, Add Platform (Website), set the url as https://a3asdf23.ngrok.io. Not finish yet, click QuickStart -> under "Tell us about your website", put the same url https://a3asdf23.ngrok.io.
    4. Then go to Products -> Facebook Login -> Settings -> Client OAuth Settings -> Valid OAuth Redirect URIs -> add these https://a3asdf23.ngrok.io, https://ngrok.io, https://a3asdf23.ngrok.io/{your-redirect-uri}.

    And here you go. Thanks me later :)

    0 讨论(0)
提交回复
热议问题