SDK BOX Facebook plugin integration as per App's work flow!

Hi friends ,
Greetings. I have created a Facebook demo project which is a basic integration for all developer who wish to integrate Facebook to there app. Most of the app developer integrate Facebook in this workflow. I have attached a zip of the demo Facebook project. It has few issues listed bellow:-

1 - i) Login button show text “LOGIN” even if User is previously Login.It should show “LOG OUT” on 2nd run.

1- ii) After Facebook login the splash screen is displayed for few seconds which is annoying.It should display the login screen directly after Facebook Login .

2 - Ask friend some times gives exception(crash) but some times work perfectly with out exception.

3 - where and how should I include permission for “FB_PERM_READ_PUBLIC_PROFILE”,“FB_PERM_READ_USER_FRIENDS”,“FB_PERM_READ_USER_FRIENDS”

Please do appropiate updates to the attached demo code to make it bug free and attach the demo on this thread ,so that all novice developer friends will get a fully functional Facebook integrated source code(as per app workflow) using SDKBOX Facebook plugin.I have used cocos2dx-V3.6 and latest SDKBOX Facebook plugin.

Thank You @slackmoehrle,@nite for updating us about current releases and demos.
I greatly appreciate your help !!
Thank You !! :slight_smile:
facebook-2dxV3.6-demo.zip (125.8 KB)

Thanks for the demo, I’ll try it out.

I can confirm that No.1 is a known issue, and @yinjimmy is working on it.

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
  // ...

  //
  // **************************
  // !! IMPORTANT !!
  // **************************
  //
  // call [[FBSDKApplicationDelegate sharedInstance] application:didFinishLaunchingWithOptions
  // before app->run()

  BOOL ret = [[FBSDKApplicationDelegate sharedInstance] application:application
                                      didFinishLaunchingWithOptions:launchOptions];
  app->run();
  return ret;
}
1 Like

@nite
@yinjimmy Thank you for the quick solution.
BUG- 1.i ) is resolved. Gr8
BUG-1.ii ) still exist. any work around for this issue??
BUG-2 Could you please check the issue and update the code with implementing permission (“FB_PERM_READ_PUBLIC_PROFILE”,“FB_PERM_READ_USER_FRIENDS”,“FB_PERM_READ_USER_FRIENDS”) at appropriate places.

Thank you!! :slight_smile:

No.1 Still didn’t work for Android yet, facebook’s SDK is really hard to work with…

I’ll update the document about permissions, just need to double check Facebook again. they like to change things…

Thank you @nite !! Please let me know when we will be able to resolve all issues(attached source code in this thread) . Can you please check the issue No 2. its a crash some times but some times it works just perfectly.Stuck on that issue for more than one week .

FB_PERM_READ_PUBLIC_PROFILE = "public_profile"
FB_PERM_READ_USER_FRIENDS = "user_friends"

@yinjimmy Please checkout the attached demo project and make the appropriate updates on the demo project.That will be helpful to all developers those who are new to Facebook integration.

Bytheway the code you mentioned is a already present on sdkbox’s PluginFacebook.h file. Could you please little bit explain.

Really stuck here for more than 3 weeks i need help !!
@nite Any updates about these issues:-
1- ii) After Facebook login the splash screen is displayed for few seconds which is annoying.It should display the login screen directly after Facebook Login .

2 - Ask friend some times gives exception(crash) but some times work perfectly with out exception.

3 - where and how should I include permission for “FB_PERM_READ_PUBLIC_PROFILE”,“FB_PERM_READ_USER_FRIENDS”,“FB_PERM_READ_USER_FRIENDS”

We manage to fix the login, so you only have to do it once. Right now doing some testing.

Haven’t encounter the request friend issue, will look into that

I’ll update the documentation about the permissions.

@nite thank you !! could you please check the 2 bug(Ask friend{posting app screen shot on user FB wall} some times gives exception(crash) but some times work perfectly with out exception.) on my attached code.if this will be resolved I will be able to publish my application. please help :slight_smile: