Search code examples
iphonefacebookiosopenfeint

How can I use OpenFeint and Facebook independently in the same iOS app?


I'm developing an iOS app that includes support for OpenFeint. OpenFeint includes support for Facebook, so if the user logs in to OpenFeint, s/he can post to Facebook. I also want to allow the user to post to Facebook if s/he chooses not to login to OpenFeint. Is there a way to do this? If so, how?


Solution

  • Import the FBConnect.h file in a header, and try the following code:

    Facebook *facebook = [[Facebook alloc] init];
    [facebook authorize:@"YOUR_KEY_HERE" permissions:nil delegate:self];
    

    As long as the version of OpenFeint you're using has the latest version of the FBConnect SDK, you should be good to go!