Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/106.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
从iOS应用程序在facebook上共享照片而不使用facebook应用程序_Ios_Facebook - Fatal编程技术网

从iOS应用程序在facebook上共享照片而不使用facebook应用程序

从iOS应用程序在facebook上共享照片而不使用facebook应用程序,ios,facebook,Ios,Facebook,在iOS

在iOS<6上可以吗

在iOS 6+中,我可以使用message composer进行共享

以前版本的iOS呢?FB SDK共享使用facebook应用程序id,因此不是这样。 也许我可以用
fb://share/photo/[image\u data]?

还有其他想法吗?

对于iOS<6,您可以随时使用插件

在这里,他们分享了一个很好的例子,在你的fb账户上分享图像

查看类
示例ShareImage

- (void)loadView 
{
    [super loadView];

    self.imageView = [[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"sanFran.jpg"]] autorelease];

    imageView.frame = CGRectMake(0,0,self.view.bounds.size.width,self.view.bounds.size.height);

    [self.view addSubview:imageView];
}

- (void)share
{
    SHKItem *item = [SHKItem image:imageView.image title:@"San Francisco"];

    /* optional examples
    item.tags = [NSArray arrayWithObjects:@"bay bridge", @"architecture", @"california", nil];

    //give a source rect in the coords of the view set with setRootViewController:
    item.popOverSourceRect = [self.navigationController.toolbar convertRect:self.navigationController.toolbar.bounds toView:self.view];
     */

    SHKActionSheet *actionSheet = [SHKActionSheet actionSheetForItem:item];
    [SHK setRootViewController:self];
    [actionSheet showFromToolbar:self.navigationController.toolbar];
}

您也可以集成Facebook提供的框架。

但据我所知,fas FBConnect需要Facebook应用程序。请尝试sharekit,但在我的两个应用程序中,我使用了FBConnect,它从未要求我使用FB应用程序(其中一个在safari中使用SSO,另一个登录thr对话框)。