Skip to content

Instantly share code, notes, and snippets.

@sorenlouv
Last active March 21, 2017 15:49
Show Gist options
  • Save sorenlouv/1ac0f5d316fcbd46d8c1 to your computer and use it in GitHub Desktop.
Save sorenlouv/1ac0f5d316fcbd46d8c1 to your computer and use it in GitHub Desktop.
Getting a Facebook app id to use for fb-sleep-stats

Choose either option A or option B.

Option A: Fast way

Facebook App Id: 435522656639081

Update: Facebook has closed the app above, and you must setup your own Facebook app. Follow the instructions in option B below.

Option B: Setup your own Facebook app

Use this options, if you want to run the service from any other domain than localhost

  1. Open https://developers.facebook.com/apps
  2. Click "Add a new app"
  3. Choose "Website"
  4. Click through the setup guide
  5. In "Dashboard" copy "App ID" to config/development.json config
  6. Choose "Settings" in left-hand menu
  7. App Domains: "localhost"
  8. Site Url: "localhost:3000"

Remember to run npm run webpack after updating the app id

@edobez
Copy link

edobez commented Mar 29, 2016

Can I actually use localhost:3000/ if I want to keep the result page local only?

@Vic-Chang
Copy link

Did it mean I can't run this project in localhost ?

@BryanH
Copy link

BryanH commented May 4, 2016

@edobez @Vic-Chang You can run it locally.

Go into advanced settings, turn on Client and Web OAuth Logins, then enter http://localhost:3000/ in Valid OAuth redirect URIs.

Copy link

ghost commented May 10, 2016

I am so confused as to steps 7 and 8. What do input into those to make it work locally? Especially step 7, please. Thanks

Copy link

ghost commented May 10, 2016

An error occured while scraping. Please check to make sure your development.json config is correct [Error: Could not retrieve Facebook users]

@bluetidepro
Copy link

@BryceHudson I had the same problem. This solved the issue for me...

The protocol seems to keep changing, and the accepted answer didn't work for me today. In case it helps other searchers, this is what did work for me:

All changes were made on the Settings page under the Basic tab

1.) In the center under the first box of options, click "+ Add Platform" and choose "Website" (or whatever is appropriate for your app.)

2.) In the box that comes up for the website you just added: Site URL: http://localhost:3000/

3.) In the box above that (Settings => Basic): App Domain:  localhost

4.) At the bottom right - click "Save Changes"

5.) Make sure you have the app ID copied and pasted correctly into your code. (The ID is in the first box on that page if you need it again.)

(found via http://stackoverflow.com/questions/21295872/facebook-app-localhost-no-longer-works-as-app-domain)

@artieuk
Copy link

artieuk commented Aug 10, 2016

Can someone please clarify something for me.... When I get my FB App ID, do you have to supply a URL for the App, and is the App ID then tied to that URL?

TIA

Artie

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment