Skip to content

dev2dev/DDShareViewController

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DDShareViewController for iPhone and iPod touch

DDShareViewController is designed to share Facebook Posts rapidly on small iOS devices.

Features

  1. Easy to use, just like MFMailComposeViewController.
  2. Allow to change privacy options with single tap.
  3. Support orientations, allow to rotate with keyboard or privacy options picker on.
  4. Support retina display, both iPhone 4 and 4th generation iPod touch.
  5. Use Facebook Application ID, no more Facebook API Key and Application Secret.
  6. Use Facebook Graphic API.
  7. DDShareServiceController is designed to support other web services, like Twitter. Just subclass it, then you can start to create your own DDShareViewController.

Requirement

  1. iOS SDK 4 and LLVM compiler. (Sorry, no GCC 4.x) Demo project uses 4.2b3 SDK with LLVM compiler 1.6.
  2. Facebook iOS SDK, included in the project as git submodule.
  3. Apple's Reachability 2.2, inlcuded in the project.

Usage

Very similar to MFMailComposeViewController, initialize with DDShareServiceType, fill the arguments with methods, then bring it up by calling -presentModalViewController:animated:

#import "DDShareViewController.h"

DDShareViewController *shareViewController = [[DDShareViewController alloc] initWithType:DDShareServiceTypeFacebook];
shareViewController.shareViewControllerDelegate = self;

[shareViewController setShareURL:@"http://digdog.tumblr.com/qremoji"];
[shareViewController setShareName:@"QR+Emoji for iPhone and iPod touch"];
[shareViewController setShareCaption:@"digdog software"];
[shareViewController setShareDescription:@"A unique and elegant QR Code utility for iPhone & iPod touch. Create QR Code with Emoji icon as visual hints, and scan QR Codes through camera or saved photos."];

[self presentModalViewController:shareViewController animated:YES];

[shareViewController release];

And setup DDShareViewControllerDelegate. Unlike MFMailComposeViewControllerDelegate, this is required:

- (void)shareViewController:(DDShareViewController *)controller didFinishWithResult:(DDShareServiceResult)result error:(NSError*)error {
	[self dismissModalViewControllerAnimated:YES];
}

Also, don't forget use your own kFacebookAppId, it's defined in DDShareViewController.h.

Screenshots

License

DDSocialViewController is released under MIT License.

About

DDShareViewController is designed to share Facebook "Post" rapidly on small iOS devices.

Resources

Stars

Watchers

Forks

Packages

No packages published