views:

43

answers:

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?

A: 

Sure, there is a Facebook iOS SDK.

Martin Cote
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
A: 

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!

Farid
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
What sort of error are you getting?
Farid