Need help with FacebookSample?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

208 Stars 65 Forks 56 Commits 4 Opened issues


Facebook compose sheet view controller like in iOS 6.0

Services available


Need anything else?

Contributors list

No Data

This project based on

Facebook connection based on SDK 3.1 (last at 25 september 2012)

What is it? DEFacebookComposeViewController is an iOS 4 compatible. Looks like as the Facebook Sheet in iOS 6.

How to use

  1. download and setup Facebook sdk or from git

  2. register your app on

  3. replace on your app id in plist file. FacebookAppID and in CFBundleURLTypes

  4. #import "DEFacebookComposeViewController.h"

  5. example of usage ``` DEFacebookComposeViewControllerCompletionHandler completionHandler = ^(DEFacebookComposeViewControllerResult result) { switch (result) { case DEFacebookComposeViewControllerResultCancelled: NSLog(@"Facebook Result: Cancelled"); break; case DEFacebookComposeViewControllerResultDone: NSLog(@"Facebook Result: Sent"); break; }

    [self dismissModalViewControllerAnimated:YES];


    DEFacebookComposeViewController *facebookViewComposer = [[DEFacebookComposeViewController alloc] init]; self.modalPresentationStyle = UIModalPresentationCurrentContext; [facebookViewComposer setInitialText:@"Look on this"]; [facebookViewComposer addImage:[UIImage imageNamed:@"1.jpg"]]; facebookViewComposer.completionHandler = completionHandler; [self presentViewController:facebookViewComposer animated:YES completion:^{ }]; ```

  6. add this code to your main class and you need to be sure that app is entering to this method ``` - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {

    // attempt to extract a token from the url return [FBSession.activeSession handleOpenURL:url]; } ```

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.