自分のWallに投稿するロジック


※Facebook SDK Ver3.1になって、参照・書込の権限が分離されているので、書き込む場合は別途権限を取得する必要がある。

    if(FBSession.activeSession.isOpen){

        if([FBSession.activeSession.permissions indexOfObject:@"publish_stream"] == NSNotFound){
            [FBSession.activeSession reauthorizeWithPublishPermissions:[NSArray arrayWithObjects:@"publish_stream", nil] defaultAudience:FBSessionDefaultAudienceFriends completionHandler:^(FBSession* session, NSError* error){
            }];
        }

        NSMutableDictionary* paramDict = [[NSMutableDictionary alloc] initWithObjectsAndKeys:
                                          @"This is test column", @"message", nil];
        [FBRequestConnection startWithGraphPath:@"me/feed" parameters:paramDict HTTPMethod:@"POST"
                              completionHandler:^(FBRequestConnection* connection, id result, NSError* error){
            DLog(@"error : %@", error);
            DLog(@"result : %@", result);
        }];
    }