0

In accordance to the new General Data Protection Regulation (GDPR) I want to give the visitor of my homepage the choice to see the Twitter Timeline, or not; before the timeline itself is loaded.

How can I replace a static image on my website with the Twitter Timeline Widget on my homepage after the visitor clicked on the image?

I'm adding the timeline like this:

<p><a class="twitter-timeline" href="https://twitter.com/foo?ref_src=twsrc%5Etfw">Tweets by foo</a></p>

Has somebody heard of a github project or has somebody a rough idea, how to do this?

Marcel Gangwisch
  • 8,856
  • 4
  • 23
  • 32
  • To avoid it sounding like a work order you should post what you have already tried. – J. Pichardo May 17 '18 at 15:22
  • 1
    You could bind an event handler to the click event of the image. Then ajax load a partial with the widget on it and inject it in place of the image or where ever you want it. Hope that Idea helped. – Nope May 17 '18 at 15:25
  • 1
    Searching SO I found this, which might give you an idea: [https://stackoverflow.com/questions/14545653/how-do-i-render-new-twitter-widget-dynamically](https://stackoverflow.com/questions/14545653/how-do-i-render-new-twitter-widget-dynamically) – Nope May 17 '18 at 15:29

0 Answers0