I sort of snuck this into Simple Facebook Connect 0.18 for you all.

If you go to http://facebook.com/insights, then one of the new things they have is “Insights for your Domain”. Basically, this lets you hook the Facebook Insights system up to your own domain.

They give you meta info to add to your site so as to define who has control over that site. This lets them know who should be able to see the insights and such.

Well, if you use SFC, that information is already there for you. Just go over to the insights page, put in your domain, then “Link With” your SFC Application. No need to add anything else to your site, the base SFC plugin is adding that fb:app-id meta tag for you automatically (once you’ve configured SFC itself, of course).

Note that you may have to link it a few times before it actually takes. Facebook has to retrieve your webpage to verify the connection, and it seems to time out rather easily. Took me several tries and I kept getting messages like “Bad Domain” and such. But it finally worked.

Since I just added it, I don’t have any data yet to show you, but basically it will keep track of the “Shares” from your site, so those Share buttons will now give you some useful information and feedback on the Insights page.

Enjoy.

Additional: Note that since I wrote this post, Insights never actually updated or worked at all. Facebook basically dropped the ball and never actually finished this code or turned it on or something. I seriously wonder exactly WTF they are doing over there sometimes. Anyway, here’s the bug if you want to track it: http://bugs.developers.facebook.com/show_bug.cgi?id=10174

Shortlink:

15 Comments

  1. sorry Otto, gotta pester you with another basic question:

    when I try to do this, I can link to my profile or to my app. lets say I chose to automatically publish my blog posts to my profile and not my app, then linking this to my profile is the right choice?

    besides, does the share on FB button also publish to my profile? so lets say I just want to get some more exposure on FB, can I auto publish to my profile? add like and share buttons and use insights linked to my profile, right?

  2. It would be great, if this function could detect, whether you are using a fanpage (as defined in the SFC settings) or the standard application page.

    As it works now, the code automatically inserts the app_id, like this:

    but it would be great if you could choose your page_id:

    Or even better, a simple input box to override the standard setting with your custom meta tags.

    • For the Insights section, you always want to use the App ID, not the Fan Page. It makes things simpler all around to use the Application as it was intended to be used.

      Which one you connect the domain to doesn’t actually matter. You see the same results either way. But connecting it to the Application lets any admins of that app see the domain info as well. If you’re the only one, then no big deal, but if you manage your site with other people, then they would be able to see the insights page too if you connect it to the app and they’re admins of the app.

  3. any chance this can be changed? I opted for the wrong choice, but don’t see an option to reverse my choice 🙁

  4. I am having trouble working on it

  5. […] if you’re using SFC and haven’t enabled this sort of thing, then it’s really easy to do. You can do the same thing without SFC, it’s just that SFC makes it easy for you by putting […]

  6. Hello Otto, do you still support the Simple Facebook Connect plugin? (The plugin’s page links to this particular post.)

    Here’s my issue with the plugin:

    I am trying to remove the captcha and replace it with a honeypot field, as the captcha is barely readable and many of our visitors complain about it in the feedback section.

    Where would i start looking? I cannot figure out where the captcha logic is. Can you recommend an approach to my task?

    Best regards,
    John.

  7. I see that you have stopped supporting this plugin. Let me compliment you on it because it has been great.

    I don’t know if you have an easy fix for this, but I thought I’d try asking you anyway.

    The button to my personal page works, but the one to my fan page does not. When I click the fan page button it gives me this error…

    This dialog has been passed a bad parameter.

    API Error Code: 100
    API Error Description: Invalid parameter
    Error Message: Cannot post to a user who has not installed the application.

    Any idea what is causing this? I’ve done nothing to my FB fan page or my site, and I have not edited the plugin information in any way.

  8. Just wanted to say thanks for this plugin – had used it a lot on several of my sites and it worked great, wasn’t actually aware it’s no longer being worked on – but thanks very much.

Leave a Reply to lacike Cancel reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Need to post PHP code? Wrap it in [php] and [/php] tags.