Sharekit 2, problems with connecting to Facebook after user authentication?
Asked Answered
R

2

13

Sharekit opens up Safari to get authentication from the user which is fine (not sure if it should open up Safari or in it's own window). A page then appears saying you have authenticated app.x click ok to continue, once the continue button is tapped it tries to redirect to www.facebook.com/permissions.request but then show an error of:

'Cannot Open Page, Safari cannot open this page because the address is invalid.'

Any ideas what might be going on here, I'm presuming it should be redirecting to my app?!

Rambouillet answered 13/1, 2012 at 13:55 Comment(0)
T
20

Here's my solution to this problem (I am assuming you are using ShareKit 2.0):

I configured ShareKit following the guide they provide ShareKit Configuration Guide. In other words I subclassed the DefaultSHKConfigurator class and added all the necessary configuration there.

In my app delegate I linked the configuration class with ShareKit like this:

DefaultSHKConfigurator *configurator = [[MYSHKConfigurator alloc] init];
[SHKConfiguration sharedInstanceWithConfigurator:configurator];

And removed the configuration info from SHKConfig.h. I don't know why but this worked.

  • note: you could also get away by not subclassing and entering the configuration info directly inside the DefaultSHKConfigurator.m if you are not interested in updating ShareKit;

If you wish the Facebook screen to load inside the app and not in safari you can get inside the Facebook.m file and change the safariAuth: from YES to NO:

[self authorizeWithFBAppAuth:YES safariAuth:NO]; 
Taction answered 1/2, 2012 at 12:16 Comment(0)
N
2

Same issue here, when I stop after complete step 5 in https://github.com/ShareKit/ShareKit/wiki/Installing-sharekit.

Always got "safari cannot open then page because the address is invalid",

Finally, issue solved by complete all steps(1 to 7)

Have not changed the statement [self authorizeWithFBAppAuth:YES safariAuth:YES];

Nievelt answered 4/7, 2012 at 11:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.