Question: I am wondering if it's possible to post something on a user's facebook wall using SLComposeViewController but without showing the share sheet/dialog?

Following is the code I am using:

```
if([SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook]) {

        SLComposeViewController *controller = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeFacebook];

        SLComposeViewControllerCompletionHandler myBlock = ^(SLComposeViewControllerResult result){
            if (result == SLComposeViewControllerResultCancelled) {

                NSLog(@"Cancelled");

            } else

            {
                NSLog(@"Done");
            }

            [controller dismissViewControllerAnimated:YES completion:Nil];
        };
        controller.completionHandler =myBlock;

        [controller setInitialText:eventInfoToFacebook];

        [self presentViewController:controller animated:YES completion:Nil];

    }

```

Thanks in advance.

Answer: 
Add below Code in your ViewController and import below framework.

```
import FBSDKCoreKit
import FBSDKLoginKit
import FBSDKShareKit

@IBAction func btnPostClick(_ sender: Any)
 {
        if (FBSDKAccessToken.current() != nil)
        {
            if FBSDKAccessToken.current().hasGranted("publish_actions"){
                postOnFB()
            }
            else
            {
                let loginManager = FBSDKLoginManager()
                loginManager.logIn(withPublishPermissions: ["publish_actions"], from: self, handler: { (result, error) in
                    if error == nil{
                       self.postOnFB()
                    }
                    else{
                        print(error?.localizedDescription ?? "")
                    }
                })
            }
        }
        else
        {
            let loginManager  = FBSDKLoginManager()
            loginManager.logIn(withPublishPermissions: ["publish_actions"], from: self, handler: { (result, error) in
                if error == nil{
                    self.postOnFB()
                }
            })
        }
    }

 func postOnFB() 
   {
        FBSDKGraphRequest(graphPath: "me/feed", parameters: ["message": "YOUR MESSAGE"], httpMethod: "POST").start { (connection, result, error) in
            if error == nil{
                print("post id \(result ?? "")")
           }
            else{
                print("error is \(error?.localizedDescription ?? "")")
            }
        }
    }

```
this is possible in facebook-ios-sdk 3.0.
[here](https://developers.facebook.com/ios/)

i am making the share with this code.

```
 [FBRequestConnection startWithGraphPath:@"me/feed"
                             parameters:params
                             HTTPMethod:@"POST"
                      completionHandler:^(FBRequestConnection *connection,
                                          NSDictionary * result,
                                          NSError *error) {
                          if (error) {
                              NSLog(@"Error: %@", [error localizedDescription]);
                          } else {

                              }
                      }];

```

i called this method when user clicks share button and there is no dialog with the user it directly post to the users wall. params is parameters that sharing includes.