• Anil Kumar Kunda 4
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies
Can we embed the https://platform.twitter.com/widgets.js within a lightning component? Any best practices around implementing this would be helpful.
  • November 01, 2017
  • Like
  • 0
I've been tasked with adding a twitter feed to a page. The twitter TOS for embedding tweets requires some controls on the tweet that are provided by widgets.js. Since Lightning doesn't allow loading libraries from external sources, and Twitter doesn't allow local hosting of their library, this seems like a no-go. It does seem possible to load external libraries on community sites by modifying the header, which I'm not 100% opposed to doing if it gets the job done, but in this case, i believe the locker service will interfere with the functionality in widgets.js. Any advice here? There doesn't seem to be an obvious solution, short of pulling in tweet data via the twitter api, and then recreating the controls inside lightning, which would be a maintenance headache, and my fall outside Twitter's TOS.