objective c - FSSDKShareKit - FBSDKShareDialog crash on init iOS -


this problem: i've fallowed steps in https://developers.facebook.com/docs/ios/getting-started

i've downloaded latest sdk official site, i've configured facebook app settings , set plist file.

i've copied framework needed frameworks folder described: http://i.stack.imgur.com/kyxdq.png

i put in appdelegate:

    //  appdelegate.m #import <fbsdkcorekit/fbsdkcorekit.h>  - (bool)application:(uiapplication *)application didfinishlaunchingwithoptions:(nsdictionary *)launchoptions {   return [[fbsdkapplicationdelegate sharedinstance] application:application     didfinishlaunchingwithoptions:launchoptions]; }  - (bool)application:(uiapplication *)application openurl:(nsurl *)url sourceapplication:(nsstring *)sourceapplication annotation:(id)annotation {   return [[fbsdkapplicationdelegate sharedinstance] application:application     openurl:url     sourceapplication:sourceapplication     annotation:annotation   ]; } 

after imporing fbsdkcore , fbsdkshare in method triggered button i've fallowing code:

fbsdksharelinkcontent *content = [[fbsdksharelinkcontent alloc] init]; content.contenturl = [nsurl urlwithstring:@"my url"];  fbsdksharedialog *dialog = [[fbsdksharedialog alloc] init]; dialog.fromviewcontroller = self; dialog.sharecontent = content; dialog.mode = fbsdksharedialogmodesharesheet; [dialog show]; 

my app crashes on fbsdksharedialog *dialog = [[fbsdksharedialog alloc] init] sigabrt.

do guys have suggestions?

thank much

edit:

i've tried use fbsdksharebutton , got same issue, crashing on init... thank you!

found way solve problem.. according exception message in debug mode. need add parameters in info.plist called lsapplicationqueriesschemes.

if you're using v4.6.0 of sdk, need add:

<key>lsapplicationqueriesschemes</key> <array>     <string>fbapi</string>     <string>fb-messenger-api</string>     <string>fbauth2</string>     <string>fbshareextension</string> </array> 

refer facebook sdk document. https://developers.facebook.com/docs/ios/ios9


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -