Setting up a User Feed for multiable domains

embeddedtimeline

#1

One of my customers has about 7 domains. Some of the pages use a twitter feed, and others do not.

The accounts are all managed in a propitiatory CMS. I am wondering if there is a way to variablize the twitter name, so content creators can just add their twitter name and I could use the same code to run all of them? Please let me know if this is not clear.

Thanks!


#2

User timelines require a widget ID, which is associated with, and managed by, a specific Twitter account. The widget ID stores a package of preferences for a specific user timeline widget.

You should generate a widget ID with a stored set of user timeline settings from the customer’s main account. The customer will then be able to log in to their account and manage widget settings such as theme or link color and see those changes on their website.
https://twitter.com/settings/widgets/new/user

Create an anchor element with a twitter-timeline class and your generated widget ID. Swap in the Twitter username you would like to display.
https://dev.twitter.com/web/embedded-timelines#timeline-selection

<a class="twitter-timeline" data-widget-id="{widgetid}"
  href="https://twitter.com/{username}"
  data-screen-name="{username}">
Tweets by @{username}</a>

#3