Latest Updates: Facebook Connect RSS

  • Facebook Connect: Only for grown ups

    Ellen 13:03 on February 6, 2010 | 0 Permalink | Reply
    Tags: Facebook Connect,

    In some Facebook Connect apps you might want to target an older audience. Any Facebook user is required to fill in their date of birth so the birthday field of the profile can be a way to check that your user has the appriopriate age for your application. This can be done by checking the birthday date of the user (birthday_date) using the function
    users_getInfo($uid, 'birthday_date').

    birhtdate

    Important to remember though is that if the Facebook user has chosen not to show the birth year, this will not be available for the Facebook Connect application. To determine that the Facebook user has the appropriate age her settings on Facebook must look as follows:

     
  • Facebook Connect: No server-side needed

    Ellen 17:27 on January 15, 2010 | 0 Permalink | Reply
    Tags: Facebook Connect, javascript

    With the Facebook Connect API comes javascript functionality. This means no server-side scripting needed. You can create your application on Facebook and connect to it from your website thought javascript. Use the API Key and Secret Key to connect to you application. Make sure your callback URL is set on Facebook to be the URL of the page you are connecting from.

    Create your customized Facebook Connect login button through this wizard. Paste in the code into your site.

    Enabling calls to the javascript API on Facebook:
    <script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php/sv_SE" type="text/javascript"></script>

    Generating the login button on your site:
    <fb:login-button v="2" size="medium" onlogin="window.location.reload(true);">Log in to Facebook Connect</fb:login-button>

    The Facebook Connect login will appear in a pop-up window. When successfully logged in, the window closes and your main page reloads.

    The output
    In the Javascript function FB.ensureInit you can then put in your API calls and generate your HTML from that. Below is an example of showing selected information from a user’s profile.

    <script type="text/javascript">
    var widget_div = document.getElementById("profile_pics");
    FB.ensureInit(function () {
    FB.Facebook.get_sessionState().waitUntilReady(function() {

      var session = FB.Facebook.apiClient.get_session();

      FB.Facebook.apiClient.users_getInfo([session.uid], ["about_me","books","interests","movies","music",
    "religion","tv","quotes","education_history","political","sex","meeting_for"],

    function(result) {
      var markup = "";
      for(var o in result[0]) {
      markup += "<br>" + o + " : " + result[0][o];
    }
    widget_div.innerHTML = markup;
    FB.XFBML.Host.parseDomElement(widget_div);
    });
    });
    });
    </script>

     
  • Add Facebook Connect to your blog comments

    Ellen 11:09 on December 15, 2009 | 0 Permalink | Reply
    Tags: comments, , Facebook Connect,

    This neat video explains how you can add Facebook Connect to your blog and let users add comments by logging into Facebook Connect! No server-side scripting needed!

     
c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
esc
cancel