iOSSocialViewControllers are a collection of classes that provide pre-built UI's for using iOSSocial to interact with social networking sites.
Hopefully coming soon!
iOSSocialViewControllers are stand alone, drop-in classes that require prior integration with iOSSocial to work. Just drag the classes into your project and you are ready-to-roll.
To integrate with iOSSocial, view the readme for it here: https://github.com/chris124/iOSSocial
Use iOSSServicesViewController to present a list of supported services to the user. The controller is evolving, but for now, it shows a list of available services to connect to (based on the services you choose to configure. Read below on iOSSocialServiceProtocol.):
When a service is chosen, the OAuth page for the service is shown:
If the user authenticates for the service, their user account is shown as connected under the accounts section:
Selecting an already connected account logs the user out of that account (ie, clears out their locally stored OAuth access token for their account on the given service). Selected a disconnected account will let the user log back in:
Here is the code in action:
iOSSServicesViewController *iossServicesViewController = [[iOSSServicesViewController alloc] initWithServicesFilter:nil];
[iossServicesViewController presentModallyFromViewController:self
withServiceConnectedHandler:^(id localUser) {
}
withCompletionHandler:^{
[self dismissModalViewControllerAnimated:YES];
}
];
If you want to filter which services are displayed in the view controller, pass in an array of service names.
NSArray *filter = [NSArray arrayWithObjects:@"Twitter", nil];
iOSSServicesViewController *iossServicesViewController = [[iOSSServicesViewController alloc] initWithServicesFilter:filter];
[iossServicesViewController presentModallyFromViewController:self
withServiceConnectedHandler:^(id localUser) {
}
withCompletionHandler:^{
[self dismissModalViewControllerAnimated:YES];
}
];