Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tweet image is not showing. #3

Open
asifrafeeq opened this issue Aug 14, 2019 · 1 comment
Open

tweet image is not showing. #3

asifrafeeq opened this issue Aug 14, 2019 · 1 comment

Comments

@asifrafeeq
Copy link

my code is like this below, I am following your example, but it doesn't show the image, although it is showing the tweet text.

echo "<ul>";
foreach ($user_timeline as $user_tweet) {
  echo "<li>";
  echo TwitterTextFormatter::format_text($user_tweet) . "<br/>";
  // Print also the tweet's image if is set
  if (isset($user_tweet->entities->media)) {
    $media_url = $user_tweet->entities->media[0]->media_url;
    echo "<img src='{$media_url}' width='150px' />";
  }
  echo "</li>";
}
echo "</ul>";

please help.. thanks a lot in advance.

@sampauldean
Copy link

Did you find a solution here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants