0

I am trying to integrate Facebook with Nextpeer. When i tell nextpeer about successful login by these methods:

[Nextpeer loginWithFacebook];
[Nextpeer logoutFromFacebook];

I gives me warning on console

Nextpeer warning: Couldn't login Facebook user - no instance of NPFacebookBridgeDelegate provided.

I have also provided implementation for delegate methods of NPFacebookBridgeDelegate which are:

-(NPFacebookSession*) getCurrentFacebookSession;
-(void) destroyCurrentFacebookSession;
-(void) requestFacebookSessionWithPermissions:(NSArray*)permissions completionBlock:(void (^)(NPFacebookSession* session))completionBlock;
-(void) requestFacebookPermissions:(NSArray*)permissions completionBlock:(void (^)(NPFacebookSession* session))completionBlock;

but these never gets called. Anyone have any idea what am I missing?

Thanks

2 Answers2

0

You missed passing the NextpeerFacebookBridgeDelegate in the initializion phase, as the log said.

Read more here https://nextpeer.atlassian.net/wiki/display/NS/Facebook+Integration

Muddy Waters
  • 113
  • 9
0

Thanks.. I did it by changing init of nextpeer from

[Nextpeer initWithProductKey:];

To this:

[Nextpeer initializeWithProductKey:GAME_KEY andDelegates:[NPDelegatesContainer containerWithNextpeerDelegate:self tournamentDelegate:self facebookBridgeDelegate:self] ];