Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v7.16.1 iOS crash in FB.FeedShare API #284

Closed
sonjoono opened this issue Jul 16, 2019 · 10 comments
Closed

v7.16.1 iOS crash in FB.FeedShare API #284

sonjoono opened this issue Jul 16, 2019 · 10 comments

Comments

@sonjoono
Copy link

sonjoono commented Jul 16, 2019

unity 2018.3.4f1

i have upgrade facebook sdk from v7.15.0 to v7.16.1

it works on webgl and android

2019-07-16 12:13:59.692006+0900 xxxxxx[795:499714] -[FBSDKShareLinkContent setFeedParameters:]: unrecognized selector sent to instance 0x282053e30
2019-07-16 12:14:00.189665+0900 xxxxxx[795:499714] Uncaught exception: NSInvalidArgumentException: -[FBSDKShareLinkContent setFeedParameters:]: unrecognized selector sent to instance 0x282053e30
(
0 CoreFoundation 0x00000001a04cd294 + 252
1 libobjc.A.dylib 0x000000019f6a79f8 objc_exception_throw + 56
2 CoreFoundation 0x00000001a03e9ab8 + 0
3 CoreFoundation 0x00000001a04d2ac4 + 1408
4 CoreFoundation 0x00000001a04d475c _CF_forwarding_prep_0 + 92
5 xxxxxxx 0x000000010127d998 -[FBUnityInterface shareFeedWithRequestId:toId:link:linkName:linkCaption:linkDescription:picture:mediaSource:] + 460

@arzakmiftakhul
Copy link

Hi, I get same error in FB.FeedShare
I use FB sdk v7.17.2 and "-ObjC" flag already exist in xcode project.
I tried :

  1. Add "-all_load" flag
  2. change "-all_load" to "-force_load"

and always get error :
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[FBSDKShareLinkContent setFeedParameters:]: unrecognized selector sent to instance

Anybody solved this?

@mali90
Copy link

mali90 commented Aug 20, 2019

Hi, I'm getting the same error in FB.FeedShare.

Unity version: 2018.3.14f1
SDK: 7.17.1
Platform: iOS

Error:

Uncaught exception: NSInvalidArgumentException: -[FBSDKShareLinkContent setFeedParameters:]: unrecognized selector sent to instance 0x516125f0

Any fixes?

@GauravG1
Copy link

GauravG1 commented Sep 3, 2019

Hi,
I am getting the same error in 7.17.2 on IOS.
Unity Version: 2019.1.8f1.
Did anyone get any fix?

@npicouet
Copy link

Same error using FB.FeedShare!
Application crashes immediately after getting this error.

Unity version: 2019.1.1f1
SDK: 7.17.2
Platform: iOS

@trtuanpham
Copy link

Same error using FB.FeedShare!

Unity version: 2019.2.3f1
SDK: 7.18.0
Platform: iOS

@sonjoono
Copy link
Author

ok. I found out how to fix this bug.

i have tested in SDK version 7.18.0
it's maybe same all SDK version from 7.16.x to 7.18.0

try to comment line in Assets/FacebookSDK/SDK/Editor/iOS/FBUnityInterface.mm

  • (void)shareFeedWithRequestId:(int)requestId
    toId:(const char *)toID
    link:(const char *)link
    linkName:(const char *)linkName
    linkCaption:(const char *)linkCaption
    linkDescription:(const char *)linkDescription
    picture:(const char *)picture
    mediaSource:(const char *)mediaSource
    {
    FBSDKShareLinkContent *linkContent = [[FBSDKShareLinkContent alloc] init];
    NSString *contentUrlStr = [FBUnityUtility stringFromCString:link];
    if (contentUrlStr) {
    linkContent.contentURL = [NSURL URLWithString:contentUrlStr];
    }

    NSMutableDictionary *feedParameters = [[NSMutableDictionary alloc] init];
    NSString *toStr = [FBUnityUtility stringFromCString:toID];
    if (toStr) {
    [feedParameters setObject:toStr forKey:@"to"];
    }

    NSString *captionStr = [FBUnityUtility stringFromCString:linkCaption];
    if (captionStr) {
    [feedParameters setObject:captionStr forKey:@"caption"];
    }

    NSString *sourceStr = [FBUnityUtility stringFromCString:mediaSource];
    if (sourceStr) {
    [feedParameters setObject:sourceStr forKey:@"source"];
    }

    //linkContent.feedParameters = feedParameters; // <<<=========== comment this line
    [self shareContentWithRequestId:requestId
    shareContent:linkContent
    dialogMode:FBSDKShareDialogModeFeedWeb];
    }

@minnleee
Copy link

minnleee commented Dec 9, 2019

FBSDK version 7.17.2 still have this issue, and @sonjoono 's solution works, thanks

@NikolayTimofeev
Copy link

Unity 2019.2.16f1
Unity Facebook SDK 7.18.1
XCode 11.3.1

The same issue still not fixed on iOS and Facebook threatens to place a restriction on the app.
Fun times. almost a year without an official fix from Facebook.

@sp-jordi-vilalta
Copy link

The issue is still present in Unity Facebook SDK 7.19.0

facebook-github-bot pushed a commit that referenced this issue Apr 8, 2020
Summary:
As title

Fix crash issue: #284

Reviewed By: Oliverccccct

Differential Revision: D20929247

fbshipit-source-id: 005bb142d9a3dcf150d9d74b89b6c122f91787e5
@KylinChang
Copy link
Contributor

The issue should be fixed in 7.19.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants