Skip to content

Facebook Connect for iPhone – Facebook Developer Wiki

While connecting to Facebook isn’t rocket science, it isn’t 100% straight forward either. These links sd help…

Facebook Connect for iPhone – Facebook Developer Wiki

Their api is pretty good, but doesn’t match 1-to-1 for their Objective-C library as far as params:

This page helps step you thru getting their code in your project…

I had to make a change to the Facebook code for uploading an image. Their doc says the upload file parameter is to be raw data which their code handles, however, it states there is no name. That’s fine. But, the sig generation doesn’t handle this well. If there’s no name, it sdn’t add it to the sig…
[sourcecode lang=”cpp”]

– (NSString*)generateSig {
NSMutableString* joined = [NSMutableString string];

NSArray* keys = [_params.allKeys sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)];

for (id obj in [keys objectEnumerator])
// if there’s no name, don’t add it to the sig
if (0 == [obj length])
[joined appendString:obj];
[joined appendString:@”=”];
id value = [_params valueForKey:obj];
if ([value isKindOfClass:[NSString class]]) {
[joined appendString:value];


0 thoughts on “Facebook Connect for iPhone – Facebook Developer Wiki”

  1. Funny, I just went through all that process integrating Facebook Connect with Flower Garden. I even had to make that exact bug fix on FBRequest! 🙂

  2. for (id obj in [keys objectEnumerator])

    should be written as

    for (NSString* obj in keys)

    1. I agree – that’s how I would do it. But their way seems to work fine too. Thanks!