如何将照片从iOS应用程序上传到特定的FaceBook页面?

时间:2014-12-05 10:11:23

标签: ios facebook facebook-graph-api

我是iOS开发中的新手。我制作了一个应用程序,从照相机拍摄照片并将其保存到移动图库但我想当用户从相机拍摄照片然后我想从特定的Facebook页面发布此照片,如我的Facebook页面link如何可能吗?如果有可能那么请给我解决方案,如果可能,给它任何资源。

这里我的FaceBook页面是公开的。

这里是我的ImagePicker代码

-(IBAction)cameraButtonPressed:(id)sender
{
UIImagePickerController *imgpicker=[[UIImagePickerController alloc]init];
if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera])
{
    imgpicker.sourceType=UIImagePickerControllerSourceTypeCamera;
    imgpicker.mediaTypes=@[(NSString *)kUTTypeImage];
    imgpicker.delegate=self;
    [self presentViewController:imgpicker animated:YES completion:nil];
}
else
{

    UIAlertView *alert=[[UIAlertView alloc]initWithTitle:@"Error" message:@"You have not Camera" delegate:self cancelButtonTitle:@"Ok" otherButtonTitles:nil, nil];
    [alert show];

}

}
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)image editingInfo:(NSDictionary *)editingInfo
{
[self.library saveImage:image toAlbum:@"Celebrate Christmas" withCompletionBlock:^(NSError *error)
{
    if (error!=nil)
    {
        NSLog(@"Big error: %@", [error description]);
    }
}];

[picker dismissModalViewControllerAnimated:NO];
}

0 个答案:

没有答案