I am fetch tweets using twitter api 1.1 and show them in TWTRTweetTableViewCell but TWTRTweetView is showing the space for media/image but the image/media not showing only text is displaying in TWTRTweetView.
Showing tweets
TWTRTweet *tweet = [self.arraySocialPosts objectAtIndex:indexPath.row];
TWTRTweetTableViewCell *cell = (TWTRTweetTableViewCell *)[tableView dequeueReusableCellWithIdentifier:@"TweetCell" forIndexPath:indexPath];
[cell configureWithTweet:tweet];
cell.tweetView.delegate = self;
return cell;
and for fetching tweets
NSURL* url = [NSURL URLWithString:@"https://api.twitter.com/1.1/statuses/home_timeline.json"];
NSDictionary* params = @{@"count" : @"50"};
SLRequest *request = [SLRequest requestForServiceType:SLServiceTypeTwitter
requestMethod:SLRequestMethodGET
URL:url parameters:params];
request.account = self.account;
[request performRequestWithHandler:^(NSData *responseData,
NSHTTPURLResponse *urlResponse, NSError *error) {
if (error)
{
NSString* errorMessage = [NSString stringWithFormat:@"There was an error reading your Twitter feed. %@",
[error localizedDescription]];
[[AppDelegate instance] showError:errorMessage];
}
else
{
NSError *jsonError;
NSArray *responseJSON = [NSJSONSerialization
JSONObjectWithData:responseData
options:NSJSONReadingAllowFragments
error:&jsonError];
if (jsonError)
{
NSString* errorMessage = [NSString stringWithFormat:@"There was an error reading your Twitter feed. %@",
[jsonError localizedDescription]];
[[AppDelegate instance] showError:errorMessage];
}
else
{
dispatch_async(dispatch_get_main_queue(), ^{
if(completion){
NSArray *tweetsArray = [TWTRTweet tweetsWithJSONArray:responseJSON];
//(NSArray *)tweetsWithJSONArray:(NSArray *)array
completion(tweetsArray);
}
});
}
}
}];