5

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.

For 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

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);
            }
        });
    }
}
}];

when i print the responseJSON it contains the media url's.

tobltobs
  • 2,782
  • 1
  • 27
  • 33
Waris Shams
  • 1,606
  • 1
  • 15
  • 27

1 Answers1

0

Are you running into ATS issues with pbs.twimg.com? That particular domain isn't using SHA2 at the moment.

Steven Hepting
  • 12,394
  • 8
  • 40
  • 50
  • My issue is resolved. Actually i am using Another twitter app oauth token and secrets and try to get another app data. Because of that images are not showing. After replacing the actual token and secret my issue is resolved. – Waris Shams May 17 '16 at 05:03