Problem with Twitter Timeline embedded

web
embeddedtimeline

#1

Good morning,

I hope you are all okay :slight_smile:

I am writing you because I have a problem. When I open my website index in localhost everything works well. But when I decide to refresh the page the twitter timeline doesn’t load anymore !

I know I need to put this somewhere : “twitter.widgets.load()” but I really do not understand where … I tried everything.

Could you help me or give some tips please ?

Thank you :slight_smile:


#2

Still didn’t manage it.

Can anyone help ? please :frowning:


#3

Up :slight_smile:


#4

Hi there! It looks like you are trying to use the JavaScript API from widgets.js by calling https://dev.twitter.com/web/javascript/initialization. This call should be invoked “after a page has loaded”, as described in the documentation here. Have you tried including this line in your window.onload event handler? E.g.

window.onload = function() {
  twttr.widgets.load();
  // do something else
}

Alternatively, you can also try copying the blockquote snippet into your HTML. This approach is much simpler and more adopted than the JavaScript scripting API. Check out publish.twitter.com for more examples.

Hope this helps!


#5

Hey thank you very much Wisjo !

I will try it :slight_smile:


#6

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