Dynamically creating Twitter feed for each user



Im creating a blog/social media website. i would like each user to be able to add there twitter feed into there profile. Im useing a mysql DB to hold the Twitter handle then putting it into a php varible $twittter handle but how can i dynamically create a twiiter feed for each user.

$sql = mysql_query("SELECT * FROM members WHERE id='$id'");
$getinfo = mysql_num_rows($sql);
	if($getinfo > 0){
		while ($row = mysql_fetch_array($sql)){
			$twitter = $row['twitter'];			

and what i really want is something like this

" data-widget-id="00000000000">Tweets by @<?php echo "$twitter"; ?>

Can someone help please :slight_smile:

Many thanks


You should add something like data-screen-name="<?php echo "$twitter"; ?>" to your , and for the widget id just create an embedded timeline for a user (the user doesn’t matter) and use its widget id.
There is more information about this feature we call timeline selection there:


Excellent new it was something simple just could get my head around it :slight_smile:

Thank you