1 Prediction Down, 7 to Go – Facebook Launches Connect for the iPhone

FacebookBeginning of February I announced my 8 late predictions that I thought would happen in 2009. One of those, which I actually mentioned originally last year, was that Facebook would launch a developer platform for the iPhone. Such a prediction was hinted at last year by Facebook, was supposed to launch end of last year, and it would appear that this morning it came true. As of this morning, Facebook announced they are releasing Facebook Connect for the iPhone, and announced several of the first apps using it.

The platform integrates with the iPhone XCode platform and provides libraries that make integration of Facebook into any iPhone app easy. (Here’s where I get geeky, so beware) Per the documentation, the basics are that developers simply include the libraries in this manner:

#import “FBConnect/FBConnect.h”

Following that, the basic component of the app is the session object. To create a session object, you just need to provide code similar to this:

session = [FBSession sessionForApplication:myApiKey secret:myApiSecret delegate:self];

Following that, you’ll want a basic login button you can provide to users that authenticates the user and connects with the session object. To display the login button, use code like this:

FBLoginButton* button = [[[FBLoginButton alloc] init] autorelease];
[self.view addSubview:button];

Once the user is logged in, the session object should have the session key from Facebook, and you can make normal Facebook API calls from there. From there, you can get the session key and the session secret and send them back to your servers for processing, or make simple calls back to Facebook directly from the iPhone app using the provided libraries. Facebook provides this sample code as an example on how to do it from the iPhone:

– (void)getUserName {
NSString* fql = @”select name from user where uid == 1234″;
NSDictionary* params = [NSDictionary dictionaryWithObject:fql forKey:@”query”];
[[FBRequest requestWithDelegate:self] call:@”facebook.fql.query” params:params];
}

– (void)request:(FBRequest*)request didLoad:(id)result {
NSArray* users = result;
NSDictionary* user = [users objectAtIndex:0];
NSString* name = [user objectForKey:@”name”];
NSLog(@”Query returned %@”, name);
}

It would appear that 2009 is right on track, and I can’t wait to see what more Facebook has in store for us with the recent launch of their new design, new focuses, and more. This alone may be enough to get me even further into iPhone app development as the iPhone finally has the potential to become much more “Social”.

This entry was posted in connect, Facebook, fb, iphone, platform, Technology. Bookmark the permalink.

3 Responses to 1 Prediction Down, 7 to Go – Facebook Launches Connect for the iPhone

  1. Think you are already ahead of others? It's time to leave them miles behind. Following the legacy, BuisinessProDesigns was among the first to take on iPhone application software development as soon as the iPhone SDK was released by Apple.

    Here at BusinessproDesigns, we boast of an enviable league of creative and innovative professional iPhone developers who can design any type of iPhone compatible application to suit your requirements.

    Within a short span of time we have proven our expertise in this recently identified area of business. We are committed to provide you with the highest quality application that will make your device smarter than ever.

    Our specialized fields include:

    iPhone Application Graphic Design:

    Looking for a sleek, clean and stunning look for your application? That's what we are here for! Our creative team of highly efficient graphic designers blends its creative expressions to provide you with an eye-catching and unique design that will help you to stand out from the crowd.

    Iphone Application Programming and Development:

    Our dedicated team of professionals with extensive skills and experience of OS X programming along with the use of underlying framework will provide you with a top notch application software, just what you were looking for!

    iPhone Application Marketing Solutions:

    Here in BusinessProDesigns,we believe in results. So along with providing a top notch iPhone application, we take the responsibility of marketing the product. So all you will have to do is ‘sit and relax’ !
    Quite a task, isn’t it?

    iPhone application support service:

    BusinessProDesigns has significant experience in providing iPhone application maintenance and support services.
    We believe not only in reaching the pinnacle, but also staying there. So with us you will always be ahead of others.

    Contact me now:
    Prashant Agarwal
    Business Analyst
    BusinessProDesigns.Com
    prashant@limtexit.com

  2. Abhang says:

    Hi there,
    I am implementing facebook connect in my iPhone app. Although I am not sure would I reuse the FBSession object on different UIViews. I mean, if I prompt the user with the FBDialog and once he logs in, can I do the publishing and other stuff from some other UIView. Just not sure how to retain this session.

    Thanks
    Abhang

  3. Abhang says:

    Hi there,
    I am implementing facebook connect in my iPhone app. Although I am not sure would I reuse the FBSession object on different UIViews. I mean, if I prompt the user with the FBDialog and once he logs in, can I do the publishing and other stuff from some other UIView. Just not sure how to retain this session.

    Thanks
    Abhang

Leave a comment