Contact Us
  • Tutorial: How to Create a Facebook Application to Get an App ID for your Website or Blog

    Facebook Application IconFacebook has updated the way you integrate your website into its Open Graph, and how you set up Insights, Facebook’s analytics tool, to see how users are interacting with the social plugins — primarily the Like Button and the Comments Box — you’ve added to your website’s pages.

    In this tutorial, I will describe the steps necessary to integrate your website with Facebook, by getting an App ID for your site and adding the Open Graph meta tags to your site’s pages.

    Setting up your Website as a Facebook Application

    First, you must set up your website as a Facebook “application” which provides you with an Application ID you use to integrate your website into Facebook’s Open Graph, so you can add Facebook’s Social Plugins to your site.

    Installing the Facebook Developer Application

    The first step in creating an application in Facebok is to install the Facebook Developer application.

    To do that, log in to Facebook and then visit the URL http://facebook.com/developers.

    If this is the first time you’ve installed the Developer Application, you will see the Request for Permission dialog show below:

    Click the Allow button to proceed.

    Creating the Facebook Application for your Website

    Now that you have the Developer App installed, click on the Create New App button.

    Facebook Create New App

    Give you application an “App Display Name” (the name displayed to users).

    For purposes of this tutorial, you don’t need to have a “Namespace”.

    Click the “I agree to Facebook Platform Policies” box; then click the Continue button.

    Create Facebook App Popup Dialog

    On the next screen, enter the security phrase and then click Submit.

    Facebook App - CAPTCHA

    There are a lot of options you can tweak related to your application. In this post, we are going to focus on the basics needed to get your website set up with a Facebook App ID.

    The Settings Tab

    This is where you do the basic set up for your app.

    For the purposes of this tutorial, you need to concern yourself only with the Basic Settings which will suffice for setting up your website as an application to get an App ID.

    Facebook - App ID

    OK, there’s your App ID! You’re almost there. Your App ID is the value you’ll be using to integrate your website with Facebook’s APIs so you can add the Social Plugins (Like Button, Send Button, Comments Box, etc.).

    For the purposes of this tutorial, you won’t need your “App Secret” value.

    Second, notice the “edit icon” below the App Secret. You don’t need to add an icon. If your website has a favicon, it will be displayed next to your site’s URL in Facebook Insights.

    Basic info:

    • App Display Name: Make this the same as the original value you provided;
    • App Namespace: Leave blank;
    • Contact Email: Where you want Facebook to send emails regarding your app;
    • App Domain: just put “mydomain.com” where “mydomain.com” is your website’s domain URL (TLD);
    • Category: Select a category from the pulldown list (optional).

    Cloud services

    This is not applicable for a “website” Facebook application.

    Select how your App integrates with Facebook

    It’s here where you tell Facebook that your App is a website or blog.

    Facebook App - Website

    Once you’ve filled in your website or blog URL, click the “Save Changes” button and you’re done!

    Your website is now an “object” in Facebook’s Open Graph, with its own App ID.

    NEXT: How to Add the Open Graph Meta Tags and Social Plugins to your Website.

    OR: How to Integrate your WordPress Website or Blog with the Open Graph and Add Facebook’s Like Button & Social Plugins

    Next, I’ll show you how to add your website to Facebook’s Insights analytics tool.

    Comments

    1. Tim – Awesome post here! Two very quick question: Why are you recommending creating an app ID for primarily the Like Button and the Comments Box plugins? Also, once these apps are created, will the Insights area of the app display data for a plugin that includes the app ID tag?

    2. John, If you’re asking if you can just add the App ID in the Like Button and Comments instead of creating the Open Graph meta tags, you could do that.
      Of course, you still need the App ID to see Insights for your domain. Creating the App for your website integrates it into the OG.
      And you should then be able to view Insights for the domain, once you’ve “claimed” your domain to add it to Insights. Here’s our tutorial for adding your domain to Insights.

    3. Yes, when a plugin has an App ID you can track its usage in Insights.

    4. Joby Joseph says:

      How To Create a Facebook Application http://bit.ly/AdW6zl

      A very simple how to guide for beginners.

    5. Jesus de La Garza says:

      Hi, I’ve some questions and hope you can help me. 

      How does this work if I’ve a FB Fan page for my website? Can this 2 things can work together? or which one should I use? 

      Thanks in advance for your help and clarification on this matter.

    6. api id and api key are same or not tell me plz…………

      • The App ID i the unique numerical identifier you get for each Facebook app you create. You don’t get an “API Key” anymore when you set up a Facebook app. I know API keys were for Facebook Connect.

    7. Hey there, 

      Great post! I’m still confused as to if I can set up this app for social plugins on a website so it links to my FB Brand page rather than have it being attached to my personal profile. What is the best course of action if I’d like to go through with something like that? 

      My apologies for what is most likely an “un-pro” question. 

      Thank you so much

    8. I’m not sure I understand your question. What is the “it” that “links to my FB Brand page”? A “Like” button on your website should Like the specific page the button’s on, or the website itself. I also don’t understand what you mean by “attached to my personal profile”.

      •  I’m having the same problem. I administrate Facebook pages for clients and when I follow the steps in the tutorial it forces me to log in to my “personal” account and page. I need to get an AppID for my clients page. Any help? Thnx for this!

        • You must be logged in to *your* personal account to create an app. You can then make your client an admin of the app, and even remove yourself as an admin, but the creator of the app has to be the logged in user.

        • You can only create an app while logged in as your personal profile. You can then add your client as an admin of the app, if they request that.

    9. This is a great tutorial, thank you! However, I can only get it to work if the user who presses the recommend-button on my site uses the timeline. If the user doesn’t have the timeline, the thumbnail and title disappears when it publishes on the users wall. But again – if the user write something in the “contentbox” that pops up, when he presses recommend, and then publish the recommendation, everything is fine both in the timeline, and on the “old” wall.

      Don’t know if you understood this, but if you did, I would appreciate EVERY help I could get :)

    10. Hi. I’m going through your steps – but I don’t get the option of a ‘Website’ tab… only ‘Website with Facebook login’ tab – I don’t want my users to be forced to login to access my website – is this what that means? Or will it just mean that if someone clicks ‘like’ and they’re not signed in they get the option to sign in? I’m sure you can understand my horror at the idea of my potential customers being asked to login to access my web pages!

    11. Yes, Facebook has changed the “Website” option to “Website with Facebook login”. You still want to use this and, no, it won’t force anyone to log in to Facebook to view or use your website.
      I think the new labeling is confusing, for sure.

    12. HI, I am trying to get the Facebook API key for a page I administrate. Until now I can only do this for my personal page. As soon as I try to go on the developers page it asks me to switch to using facbook as myself

      • It sounds like you’re using Facebook as your page and not your personal profile. You’ll need to switch to your personal profile before you can access the apps you admin.

    13. Awesome post – thanks for the help!

    14. Almost a year old, but still seems valid…

    15. Is there a way to create multiple apps that use the same appid and appsecret? I am running an ad campaign on facebook and want to track which ad has been most effective in getting our audience to our facebook app. Right now, even though each ad has a uniqe id, when i look at our tracking stats for these ads I’ll I see is the ID we set up for the app…i can’t tell which ad was more effective in bringing people in. any help would be greatly appreciated!

      • So you’re saying you have a Facebook app that’s installed on multiple pages, and you want to track hits to each page’s instance of that app. Correct?
        And I take it that you’re using Insights to try to determine the source of traffic to each page’s instance of your tab app.
        Or you’re using the ad’s tracking stats, provided by Facebook, and it’s just showing the app ID, not the page that app lives on, yes?
        You might try adding Google Analytics to the Facebook tab’s code and then see if, under “referrers” you can get tracking data by app ID.
        That’s all I can think of, Michelle. Let me know how it turns out.

        • Thanks Analisa! I’ll give it a shot and let you know how it works out.

        • Actually to clarify, we have an app on one page and use several versions of ads to redirect to that app. We want to know which ad was most effective in bringing them to the app, while still being able to see (separately) the leads from the app itself (hope that clears things up a bit)

    16. Hi Tim,
      This is a high utility description of the ID app creation process. Thank you.
      I (www.mirrorrealms.com) publish 2 Virtual World MMORPG’s from Japan. I am confused about the need for two application ID’s as spelled out in paragraph 13b. of their policies http://developers.facebook.com/policy/. Does this mean one player can NOT login to both the browser version of our game and a facebook version using the same account? What is the purpose of this policy, do you know?

      We want to use the same server for both versions.

    17. I’m sorry, Zorba. I can’t help you here.

    18. dankomatasic says:

      I had a big problem, couse every time I try to click and get http://facebook.com/developers page, I come to the https://www.facebook.com/ads/manage/campaigns

      Every damned time, so I cant get to the developers page on that way.

      Even I get developers page I can’t get to the point and moment to create new app!!!

      Even facebook official tutorial dont work for me, and yes we have hostel page on fb.

      Im pretty MAD now, should I call ambulance or somebody can help me, please?

      Tnx a lot.

    19. Thanks for this post. I was able to solve my problem with this. Much love

    20. Hi.

      Congrats for this tutorial. It’s simple and objective.

      I’ve problems with the app domain field (mydomain.com). I’ve tried with mydomain.com, http://www.mydomain.com, http://www.mydomain.com. Gives always error.

      Somebody knows the reazon?

      Thank you.

      • If it’s a free webhost a lot of them are blocked as being ‘spammy’ and you would need your own domain name.

    21. sanjeev yadav says:

      I have downloaded facebook SDK for Android example from facebook site. It was working well and allowing me to post data. But after I logout, its not allowing me login again. on UI I am getting message, we do not recognize you. In logs I am not getting any error. I tried creating new APP id, but still getting the same error.

    22. I’m having the same problem. The error message seems to relate to protocols. Doesn’t seem to matter what domain I use. I’d love an answer for this as well.

      • Doug: Provide the values you’re using for App Domain. You can, if you wish, leave it blank.

        • Tim, I’ve tried it the full http://www….., http://www…., just the domain but I always get either a reminder to include http:// or the protocol message. As you suggested I’ve done it without any domain but am not sure if that will allow my domain to post to facebook. I’ll give it a try.
          I do find it odd as I’ve created other apps on the same facebook account with no problems.
          Thanks for your help.

    23. I installed SFC but it doesn’t allow me to post to my managed Page, only to my friends friends…

    24. H. Roland says:

      I followed the instructions for Like button, I also got App ID,
      copied and pasted the script as instructed in one of my website pages, I
      can see the button, but when you click on it, it doesn’t show the link
      of my website on my facebook profile wall. Isn’t this what Like button
      suppose to do? any help would be appreciated. Here is the link on my
      webpage http://everstevia.com/shipping.html

      • Your like button works fine. Not all your Likes are going to show up on your wall or in your friends’ newsfeeds. In fact, very few of them will.

    25. What is the “error message” that you’re getting? The user you were responding to appears to be asking why, when she (or someone) clicks her Like button it doesn’t show up on their wall.
      Are you having the same problem and, if so, provide a link to the page with the Like button.

    26. Pradeep Jayaraman says:

      whats the purpose of the app domain? What does facebook do with it and how is it associated with the appID and the way its used? I do understand its the URL of the site or the sub domain. It can also be a folder within the site.

    27. Debra McNamara says:

      I registered myself as a developer for my company per your instructions when clicking on your link. I was signed in when I started. It did not give me any permission instructions. Instead it went through my experience and settings and then led me to the main page. When I click on apps it goes to my company’s main facebook page. I went to developer settings and it has noting under company. When entering in information it asks for tax id and cc information. All I want is to link my social media onto my web site. The plug in does not work. From reading your tutorial it is because I don’t have an app id, but I can’t for the life of me figure out how to get one. Please help I have literally wasted hours trying to get this figured out and am getting extremely frustrated. I don’t understand why Facebook makes it so complicated when other social media sites make it so easy.

    Speak Your Mind

    *