English 中文(简体)
Facebook,OSSDK
原标题:Facebook, iOS SDK

I am currently making a Facebook application for iOS that pulls the profile feed and puts it in a UITableView.

现在 当观点定位时:

 [facebook requestWithGraphPath:@"me/feed" andDelegate:self];

以及(避免)要求:FBRequest* request 确实是Load (id)result, i)

NSArray *messagesFBData = [result objectForKey:@"data"];
NSMutableArray *friendIds = [NSMutableArray arrayWithCapacity:messagesFBData.count];
NSMutableArray *fromData = [NSMutableArray arrayWithCapacity:messagesFBData.count];
NSMutableArray *imagesLocal = [NSMutableArray arrayWithCapacity:messagesFBData.count];
for (int x = 0; x < messagesFBData.count; x++) {
    if ([(NSDictionary *)[messagesFBData objectAtIndex:x] objectForKey:@"message"] != nil) {

        [friendIds addObject:[((NSDictionary*)[messagesFBData objectAtIndex:x]) objectForKey:@"message"]];
        NSLog(@"loop Log: %@", [(NSDictionary *)[messagesFBData objectAtIndex:x] objectForKey:@"message"]);
        [fromData addObject:[((NSDictionary*)[messagesFBData objectAtIndex:x]) objectForKey:@"from"]];
        NSLog(@"%@", [((NSDictionary*)[messagesFBData objectAtIndex:x]) objectForKey:@"from"] );
        NSDictionary *fromDataDictionary = [fromData objectAtIndex:x]; 
        [imagesLocal addObject:[UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://graph.facebook.com/%@/picture", [fromDataDictionary objectForKey:@"id"]]]]]];
            NSLog(@"facebook ID: %@", [fromDataDictionary objectForKey:@"id"]);
    } else  
         {
             NSLog(@"Nil Called");                 
         }

}

// don t forget to call loadData for your tableView
messages = friendIds;
images = imagesLocal;
NSLog(@"Equalized");
self.facebookTableView.delegate = self;
NSLog(@"Delegate Set");
[facebookTableView reloadData];

图像是全球阵容,因此可以进入——(可调用的电文*) 观点小组 ForRowAtIndexPath:NSIndexPath *)indexPath。

缩略语 观点小组 ForRowAtIndexPath:NSIndexPath *)indexPath, i have:

NSLog(@"Cell For Row Called");
UITableViewCell *cell = [tableView 
                         dequeueReusableCellWithIdentifier:@"messageCell"];
NSString *story = [messages objectAtIndex:indexPath.row];
cell.textLabel.text = story;

UIImage *image = [images objectAtIndex:indexPath.row];
cell.imageView.image = image;

cell.alpha = 1;
return cell;

因此,我的问题是,一个用户在墙上播下照片或录像时,怎么办? 我想在表象中显示形象/形象。 现在,它只是坠毁。 任何帮助都将受到高度赞赏。

Thanks, Virindh Borra

最佳回答

它在什么时候坠毁? 你们在法典中是否有任何突破点? 当你在图像中添加“UIImage” “https://graph.facebook.com/%@/picture”上的道路是否含有有效的形象?

问题回答

暂无回答




相关问题
List Contents of Directory in a UITableView

I am trying to list the contents of Ringtones directory in a TableView, however, I am only getting the last file in the directory in ALL cells, instead of file per cell. This is my code: - (...

iPhone NSUserDefaults persistance difficulty

In my app i have a bunch of data i store in the NSUserdefaults. This information consists of an NSObject (Object1) with NSStrings and NSNumbers and also 2 instances of yet another object (Object2). ...

Writing a masked image to disk as a PNG file

Basically I m downloading images off of a webserver and then caching them to the disk, but before I do so I want to mask them. I m using the masking code everyone seems to point at which can be found ...

Resize UIImage with aspect ratio?

I m using this code to resize an image on the iPhone: CGRect screenRect = CGRectMake(0, 0, 320.0, 480.0); UIGraphicsBeginImageContext(screenRect.size); [value drawInRect:screenRect blendMode:...

Allowing interaction with a UIView under another UIView

Is there a simple way of allowing interaction with a button in a UIView that lies under another UIView - where there are no actual objects from the top UIView on top of the button? For instance, ...

热门标签