1

So I'm still fairly new to web page design and I've been messing around with dreamweaver some lately. When trying to add a twitter feed to my website, I stumbled upon twitter's resources where you are basically supposed to copy the code they give you here and paste it where you want it on your website. I did that and nothing happened at all. I've tried messing with it some and nothing happens. Is there something I'm missing? Are you supposed to add anything to it? I'm just pasting the code it generates into a div container that I have placed on my website.

Even when pasting only the code to a document in notepad and opening that, the feed doesn't show.

<div id="extracontent">
    <center>twitter feed</center>
    <script charset="utf-8" src="http://widgets.twimg.com/j/2/widget.js"></script>;
    <script>
        new TWTR.Widget({
            version: 2,
            type: 'profile',
            rpp: 4,
            interval: 30000,
            width: 250,
            height: 300,
            theme: {
                shell: {
                    background: '#333333',
                    color: '#ffffff'
                },
                tweets: {
                    background: '#000000',
                    color: '#ffffff',
                    links: '#4aed05'
                }
            },
            features: {
                scrollbar: false,
                loop: false,
                live: false,
                behavior: 'all'
            }
        }).render().setUser('Jagdevelopment').start();
    </script>
</div>
5
  • It's impossible to say what's wrong without seeing your exact code - please post the relevant parts. Jun 6, 2012 at 2:32
  • First, get rid of the <center> tag. I know it doesn't solve your problem, but it's icky.
    – chharvey
    Jun 6, 2012 at 4:51
  • Noted and fixed, thanks. Jun 6, 2012 at 14:05
  • I'm experiencing the same problem. Have you managed to fix it?
    – Bart
    Jun 18, 2012 at 20:24
  • Yeah, I'll add the answer now. Jun 19, 2012 at 22:24

2 Answers 2

4

Apparently, the twitter widget will not work on local files. You can't request security information with local files. It works once the code is uploaded to a running website.

0

It doesn't look like you've copied the code correctly.

Specifically, you're missing the http:// at the start of your src.

<script charset="utf-8" 
    src="http://widgets.twimg.com/j/2/widget.js"></script>
1
  • Thanks for the idea but it's still having the same problem. Jun 6, 2012 at 12:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.