Error widgetId is a required parameter


#1

I have twitter widget in my website and it’s work properly but today I’ve found that there is error “widgetId is a required parameter” occured and twitter widget is not displayed anymore, is there someone found this problem please guide me.


#2

Can you please link us to your site so I can debug the error? Thanks!


#3

I have solved the problem.
The thing was
the

was contained inside a div with the class twitter-timeline.
Like
.... ....

#4

Hi @Alex_T_L, @kt_sawarat,

The issue was indeed caused by the container also using the twitter-timeline class name and confusing the widget extraction code. We’ve deployed a fix this afternoon that should fix the problem. The fix ensures that cases like that get ignored and won’t break the page.

Thanks for your patience.

Ben


#5

Hi @benward,

The issue seems to have returned.
When having a html structure as below, the twitter feed won’t load and the javascript error ‘Uncaught Error: widgetId is a required parameter’ is thrown.

    <div class="twitter-timeline">
         <div class="twitter">
                 <div class="main">
                      <a class="twitter-timeline" href="..." data-widget-id="..." >...</a>
                 </div>
         </div>
   </div>

Can you recheck the twitter extraction code?

Thanks in advance,
Kind regards,

Rob


#6

I am having the exact same issue. Client told me their twitter feed is no longer appearing but when I am checking the widget code its exactly as it is within their twitter account and if I check the html on the page its also right there.

The site is: http://www.tanukidata.com/

Inside of developer console its throing an error saying:

Uncaught Error: widgetId is a required parameter

This is what I have for the code:

<a class="twitter-timeline" href="https://twitter.com/tanukidata" data-widget-id="261410699086004224">Tweets by @tanukidata</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>

#7

Hi Craig,

The issue is caused because you have two timeline embed codes in your page, one of which is missing the ID mark-up (the sidebar item with text “My Tweets”). That’s what the console warning refers to.

We have a bug on our side that appears to be causing neither of the widgets to render when only one of them has an error and I’ll look into fixing that. But in the interim, you can fix the missing timeline by either removing your second embed code that’s missing the widget ID, or adding a widget ID to it.

Thanks of the report, and apologies for the confusing bug.

Ben


#8

Thanks! All fixed now!


#9