0

I have create a unity project and integrated facebookSDK sharing as a given in this tutorial(https://www.youtube.com/watch?v=XDLyYvHdlGM).

This is working fine on unity editor as they show in this tutorial but problem is this it’s not working on my iPod device.

When I click on Login button in iPod device nothing to happen just restart my app and an exception throw in Xcode:

Exception is:

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Read permissions are not permitted to be requested with publish or manage permissions.' *** First throw call stack:

(0x219f810b 0x2119ee17 0x219f7e19 0x1150aed 0x8902bf 0x89013b 0x892375 0x11e98f 0x11d34d 0x117557 0x121327 0x58bdfb 0x554179 0x54dd5d 0x79b317 0x5521a3 0x551dff 0x5517f7 0x54d1b7 0x859533 0x10d0aa5 0xa17b99 0xa17b5b 0xa0c555 0x901351 0x9d102d 0xc024eb 0x13105 0x12f05 0x38db9a1 0x23c7c7c3 0x23c7c60f 0x2336757b 0x21c463e9 0x219a9ae9 0x219bbe43 0x219bb557 0x219b9969 0x2190cbf9 0x2190c9e5 0x22b58ac9 0x25b9cba1 0xb8db 0x215bb873) libc++abi.dylib: terminating with uncaught exception of type NSException


Kindly suggest me what should I do.

Thanks!

subba raj
  • 37
  • 11
Ram123
  • 39
  • 6
  • I think that you just need to add permissions to you FB.LoginWithPermissions([permissions], callback). – Cabrra Jun 22 '16 at 16:29

1 Answers1

0

I had this same problem. I fixed it by separating my permissions into read & write permission lists. I believe the problem was coming up when I had a single list of permissions and tried to pass "publish_action" into LogInWithReadPermissions. For example:

    List<string> Readpermissions = new List<string>();
    List<string> Writepermissions = new List<string>();
    Readpermissions.Add("public_profile");
    Readpermissions.Add("user_friends");
    Writepermissions.Add("publish_actions");

    FB.LogInWithReadPermissions(Readpermissions, AuthCallBack);
    FB.LogInWithPublishPermissions(Writepermissions, AuthCallBack);

edit: This will create a problem of it's own where it will create a second dialogue (log in with publish) before the user logs into the first dialogue (log in with read). Once the permissions are separated, just make sure to request "LogInWithPublishPermissions" in the AuthCallBack of "LogInWithReadPermissions" or anytime once you are logged in.

Adam Ryason
  • 539
  • 7
  • 17