Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/113.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何共享图像+;在swift iOS中使用facebook发送文本?_Ios_Facebook_Swift_Sharing - Fatal编程技术网

如何共享图像+;在swift iOS中使用facebook发送文本?

如何共享图像+;在swift iOS中使用facebook发送文本?,ios,facebook,swift,sharing,Ios,Facebook,Swift,Sharing,我正在用swift语言为iOS操作系统编写facebook交互代码。我已经转换了登录和其他代码,但仍然坚持使用共享方法 我无法在swift中找到FBRequest类的requestWithGraphPath方法。如果有人知道这件事,请帮我。我已经在网上搜索了解决方案,但没有找到 这是我在Objective-C中的共享代码 FBRequest *req=[FBRequest requestWithGraphPath:@"me/feed" parameters:params HTTPMethod:

我正在用swift语言为iOS操作系统编写facebook交互代码。我已经转换了登录和其他代码,但仍然坚持使用共享方法

我无法在swift中找到
FBRequest
类的
requestWithGraphPath
方法。如果有人知道这件事,请帮我。我已经在网上搜索了解决方案,但没有找到

这是我在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");
        }
    }];

提前谢谢。

还有其他方法访问类的方法吗?我试过这样做-FBRequest.requestWithGraphPath如何通过使用最新的Facebook SDK获取公共权限来发布带有文本的图片?