小编use*_*300的帖子

使用新的iOS Facebook SDK API上传照片(3.0)

如何使用新的API/SDK从iOS应用上传照片到Facebook?我已经尝试过了,我没有到达任何地方,只是继续在圈子里跑.这是我目前的代码:

-(void)dataForFaceboo{
    self.postParams =
    [[NSMutableDictionary alloc] initWithObjectsAndKeys:
     self.uploadPhoto.image, @"picture", nil];
}

-(void)uploadToFacebook{

    [self dataForFacebook];

    NSLog(@"Going to facebook: %@", self.postParams);

    // Hide keyboard if showing when button clicked
    if ([self.photoCaption isFirstResponder]) {
        [self.photoCaption resignFirstResponder];
    }
    // Add user message parameter if user filled it in
    if (![self.photoCaption.text
        isEqualToString:kPlaceholderPostMessage] &&
        ![self.photoCaption.text isEqualToString:@""]) 
    {
        [self.postParams setObject:self.photoCaption.text forKey:@"message"];
    }
    [FBRequestConnection startWithGraphPath:@"me/feed"
        parameters:self.postParams
        HTTPMethod:@"POST"
        completionHandler:^(FBRequestConnection *connection,
                            id result,
                            NSError *error) 
    {
        NSString *alertText;
        if (error) {
            alertText = [NSString stringWithFormat:
                         @"error: domain = %@, code …
Run Code Online (Sandbox Code Playgroud)

facebook objective-c ios facebook-ios-sdk

5
推荐指数
2
解决办法
8615
查看次数

NSDatePicker显示错误的时间

我正在使用UIDatePicker,当它选择上午7:00时,它会在早上6点显示在UILableView中.如何设置UIDatePicker以显示正确的时间?

iphone xcode objective-c

0
推荐指数
1
解决办法
949
查看次数

标签 统计

objective-c ×2

facebook ×1

facebook-ios-sdk ×1

ios ×1

iphone ×1

xcode ×1