shenkwen
shenkwen

Reputation: 3880

Facebook Javascript SDK: Why do I need a 'app-id' when invoking FB.init()?

On this page there is a quickstart of Facebook's javascript SDK. What I don't understand is why there has to be an "app-id" in the parameter. I was just trying to build a share button on my page using javascript SDK, I don't have any facebook app.

Upvotes: 3

Views: 2390

Answers (1)

Craig Rahtz
Craig Rahtz

Reputation: 71

Using an App Id allows Facebook to track and manage usage of the SDK. Anytime you're making a call to the service, they want/need a way to identify where that call is coming from and how it's being used.

Creating an App Id is simple, though. Go to https://developers.facebook.com/ and click on MyApps at the top. There will be an option in the drop-down to Add a New App. You only need to add a couple pieces of info to get started and an App Id will be generated. You can add more info about your page or site if you want to.

If you just want to add a share button without messing with all that, use the normal Like Button Configurator: https://developers.facebook.com/docs/plugins/like-button

Upvotes: 2

Related Questions