Skip to content

A useful view controller for iOSSocial (https://github.com/chris124/iOSSocial) that makes it easy to connect to services. Distributed under Apache 2.0 license.

Notifications You must be signed in to change notification settings

chris124/iOSSocialViewControllers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

iOSSocialViewControllers

iOSSocialViewControllers are a collection of classes that provide pre-built UI's for using iOSSocial to interact with social networking sites.

Community

Hopefully coming soon!

Adding iOSSocialViewControllers to your project

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

iOSSServicesViewController


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

About

A useful view controller for iOSSocial (https://github.com/chris124/iOSSocial) that makes it easy to connect to services. Distributed under Apache 2.0 license.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published