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

4.2k Views Asked by At

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?!

2

There are 2 best solutions below

0
On

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]; 
0
On

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];