0

I am writing facebook interaction code in swift language for iOS. I have converted login and other code but stuck with sharing methods.

I am not able to find requestWithGraphPath method of FBRequest class in swift. If somebody know about this then please help me here. I have searched for solution on web but fail to find.

This is my sharing code in Objective-C

 FBRequest *req=[FBRequest requestWithGraphPath:@"me/feed" parameters:params HTTPMethod:@"POST"];
    [req startWithCompletionHandler:^(FBRequestConnection *connection, id result, NSError *error{
        if (!error) {
            // Sucess! Include your code to handle the results here                
            NSLog(@"Successful sharing");
        } else {
            // An error occurred, we need to handle the error
            // See: https://developers.facebook.com/docs/ios/errors
            NSLog(@"Error while sharing data");
        }
    }];

Thank you in advance.

RJ168
  • 1,006
  • 2
  • 12
  • 22

0 Answers0