-1
可以在iOS < 6上使用嗎?在沒有Facebook應用程序的情況下從iOS應用程序在Facebook上分享照片
在iOS 6+中,我可以使用消息編輯器共享。
以前版本的iOS怎麼樣? FB SDK共享使用Facebook應用程序ID,所以它不是這樣。 也許我可以打開原生facebook應用程序,如fb://share/photo/[image_data]?
任何其他想法?
可以在iOS < 6上使用嗎?在沒有Facebook應用程序的情況下從iOS應用程序在Facebook上分享照片
在iOS 6+中,我可以使用消息編輯器共享。
以前版本的iOS怎麼樣? FB SDK共享使用Facebook應用程序ID,所以它不是這樣。 也許我可以打開原生facebook應用程序,如fb://share/photo/[image_data]?
任何其他想法?
對於iOS < 6,您始終可以使用ShareKit插件。
在這repository,他們共享一個很好的例子來分享您的fb帳戶上的圖像。
看一看類ExampleShareImage
:
- (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];
}
您也可以集成FBConnect框架被Facebook提供。
但就像我知道FBConnect需要facebook應用程序。 – Kubba
嘗試共享包,但在我的2個應用程序中,我使用FBConnect,它從來不問我FB應用程序(一個在safari和另一個登錄thr對話框中的SSO)。 –