claytical / SocialFrameworkPlugin

Cordova plugin for iOS 6 native sharing activity
12 stars 5 forks source link

Recognising whether the device has logged into Twitter & Facebook #4

Closed joelseneque closed 11 years ago

joelseneque commented 11 years ago

I am wanting to have an error message & link to settings if the device is not logged into Twitter or Facebook.

Do you know if this is possible somehow?

claytical commented 11 years ago

The error message could be handled by the callbacks for errors and successes I believe. If you want to quit out of your app and go into Twitter settings, I think with objective C it can be done with this code:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=TWITTER"]];

Of course they'd have to go back into your application afterwards. For Cordova, unless Apple has stopped the practice, you should be able to just create a link to "prefs:root=TWITTER" instead of "http://www.example.com"