Cant embed my timeline into my website


#1

Hi,

I am trying to embed my timeline but the code generates nothing but the link. This is my code.

topcmm.extensions.twitter = {
    tip: "Twitter",
    position: "top",
    width: "500",
    height: "350",
    display: {
        type: "html",
        value: "<button>Twitter</button>"
    },
    content: "<a class=\"twitter-timeline\" href=\"https://twitter.com/mytwitter?ref_src=twsrc%5Etfw\">My twitter</a><script async src=\"https://platform.twitter.com/widgets.js\" charset=\"utf-8\"></script>",
    action: "sendTwitterRequest()"
}

What am I doing wrong?

Thank you


#2

Hi @superchain,

Not sure what topcmm.extenstions is, but you can create timeline embed codes at https://publish.twitter.com or use a factory function like twttr.widgets.createTimeline (documented here: https://dev.twitter.com/web/embedded-timelines/user)

I hope that helps!


#3

Hi,

thank you for your answer. My embed code is from https://publish.twitter.com. However something is wrong because it wont get parsed through my javascript code above. The html parses just fine but not the script part.

Thank you.


#4

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.