arm1.ru

Embedding the Facebook SDK in an iOS app

A note to self. Instructions on where to download it and how to embed are in Facebook’s docs. Even though they updated the GitHub project recently (November 23 at the time of writing), they still ship an old version of the JSON framework bundled with it. And since my project already uses a newer version of that framework, the app wouldn’t compile.

Fix:

  1. after adding the SDK to the project, delete the JSON folder from the Facebook SDK;
  2. in FBRequest.m replace the line #import "JSON.h" with #import "SBJson.h";
  3. in the same file, replace
    SBJSON *jsonParser = [[SBJSON new] autorelease]
    with
    SBJsonParser *jsonParser = [[SBJsonParser new] autorelease]

Should work.

keyboard_return