2

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?

Josh Brown
  • 52,385
  • 10
  • 54
  • 80

2 Answers2

0

Sure, there is a Facebook iOS SDK.

Martin Cote
  • 28,864
  • 15
  • 75
  • 99
  • Thanks, but I already tried to add that in addition to OpenFeint. Lots of errors related to classes being declared twice, since OpenFeint already uses the Facebook iOS SDK. – Josh Brown Oct 11 '10 at 03:57
0

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!

Simon
  • 937
  • 1
  • 8
  • 25
  • Thanks for the suggestion. Unfortunately, OpenFeint doesn't seem to have the latest version of the Facebook SDK (or they've modified it somehow), so the code above didn't work for me. – Josh Brown Oct 25 '10 at 06:31