Iâm struggling with embedding a Twitter list in our application. The problem is that we only want the Twitter widget to be displayed when the user clicks on a âNewsâ link. If we follow the normal procedure of embedding the script, then the Twitter feed displays in our home page. If we only run the TWTR.Widget script from a javascript method launched by clicking the âNewsâ link, then the Twitter feed doesnât appear in the correct place in the DOM. What Iâm trying to do is very simple and obvious behavior, so I must be missing something obvious.
This is the script that Iâm using:
<script>
new TWTR.Widget({
version: 2,
type: 'profile',
rpp: 8,
interval: 30000,
width: 'auto',
height: 223,
theme: {
shell: {
background: '#9ebbc7',
color: '#4069a6'
},
tweets: {
background: '#ffffff',
color: '#000000',
links: '#1b6694'
}
},
features: {
scrollbar: true,
loop: false,
live: false,
hashtags: true,
timestamp: true,
avatars: false,
behavior: 'all'
}
}).render().setUser('GTExPortal').start();
</script>