GithubHelp home page GithubHelp logo

chris124 / iossocialviewcontrollers Goto Github PK

View Code? Open in Web Editor NEW
8.0 2.0 3.0 106 KB

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.

Home Page: http://about.me/mrchristopher

Objective-C 100.00%

iossocialviewcontrollers's Introduction

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

iossocialviewcontrollers's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.