I have attempted to follow the steps for creating the Twitter feed widget, as found here: https://twitter.com/settings/widgets

When you click "create new", you are taken to a separate "publish.twitter.com" subdomain in which you don't seem to be able to persistently a new widget. You can produce an embed code.

This embed code is very similar to the current embed code in the module, but there is a Javascript error when passing the widget_id for *new* sites that now seem to not be able to produce a widget id.

I'll be submitting a patch that removes the required form value for new Twitter feed instances.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nerdstein created an issue. See original summary.

nerdstein’s picture

Status: Active » Needs review
FileSize
2.62 KB

A patch that makes widget ID not required.

naveenvalecha’s picture

Status: Needs review » Needs work

Thanks for initial patch.
This needs hook_update as well.

Jorge Navarro’s picture

The widget-data-id is no longer available when creating a twitter widget. Maybe the field should be removed. Creating the block without the id works fine.
For lists now we need to add [user]/lists/[list-name].

ckoppenhaver’s picture

I have added to the patch to take care of the form validation looking for the widget_id also updated the schema to allow non unique widget_ids in the database.

naveenvalecha’s picture

Status: Needs work » Needs review

running tests

EsmeraldaUBM’s picture

Status: Needs review » Reviewed & tested by the community

Tested and reviewed. Works with widget and without widget ID.

JosueRodrigu3z’s picture

Any update on when this would be merged? We are having this issue at Yale University and quite a few users in need of this update.

t.a. barnhart’s picture

thanks for doing this! Twitter doesn't really understand social very well, i don't think.

(could a note be added to the module's page noting that new users need to patch the module? hopefully others won't waste time before clicking to the Issues page as i did. thank you!)

jrearick’s picture

I'm with JosueRodrigu3z and would like to see this at least merged into a dev branch so we don't have to mange this patch. #5 seems to work well for us. As far as I know, there is no workaround to get this to work with new widgets without applying this patch.

hamuchen’s picture

Component: Miscellaneous » Code
Category: Support request » Bug report
Priority: Normal » Critical

#5 works great, this module doesn't work (for new installs) without it => changed prio and category.

Anonymous’s picture

#In the meantime, maybe somebody could explain to this numpty how to apply a patch?

naveenvalecha’s picture

upperholme’s picture

I'm not clear as to why this patch has not been merged into a release some six months after the patch was produced. The module as it stands doesn't appear to work at all, for reasons as described above, so new users, myself included waste time installing a broken module. This module has a status of being 'actively maintained' but that doesn't appear to be the case. Maybe the maintainer has walked away?

apatsekin’s picture

So the module (stable and dev versions) for Drupal 8 is now completely useless. It requires WidgetID which was removed by Twitter a half-year ago.

hassebasse’s picture

Absolutly correct apatsekin, the module is useless as there is no WidgetID anymore and it should be mentionned so noone is spendning time with it as I did yesterday. I added the Twitter code directly into a bloc and it works perfectly fine.

Here is an explanation by andypiper at Twitter Staff.

https://twittercommunity.com/t/how-can-i-get-a-twitter-widget-id/68917/17

All the best

Hans

pheski’s picture

@hassebasse -

I've not been successful yet at adding the twitter code (for a timeline) into a custom block.

I got the embed code from Twitter, created a custom block (full html) and pasted the embed code in. The block shows me the code but not the timeline. Any help would be greatly appreciated.

hassebasse’s picture

Hi

Probably you have just pasted the code in just as you paste any text and then it will transform to and show up as text.

In Full HTML you will find a a button named Source. Click on that button, paste the code, click on the button again so you get out form the source and then you save the block. Now the HTML code from Twitter is saved as HTML code in the block.

You can use the Source function to modify almost any HTML and CSS code manually.

All the best

Hans

pheski’s picture

@hassebasse

Thank you x 3:

  1. Fixed my problem.
  2. Taught me something new that will help me with other problems.
  3. Prompt answer without making fun of a learner.

Your karma account has been credited. :-)

hassebasse’s picture

Hi

It's a shame that you feel you have to mention n° 3, isn't it, but I do understand your feeling. I've fought with Drupal for 2 years now and I remember very well how desperate I have been when noone have helped me when I've been stuck.

Thanks for karma !

Have a good evening (evening at least here in France)

Hans

pheski’s picture

As a follow-up, I tried to do the same thing on a Drupal 7 site and was stuck for a while. It kept stripping out the second (script) piece of my embed code.

The solution I found was to edit the CKEditor configuration -> cleanup and output -> advanced content filter (it was disabled by default) -> automatic

and make sure this line is there: config.allowedContent = true;

Hope this helps someone else.

Gixxernutter’s picture

+1 on twitter_block-2751845-5.patch - works great - thanks

hassebasse’s picture

Gixxernutter, but why using the module at all? Why not just putting the code into a block?

All the best

Hans

Gixxernutter’s picture

Hi Hans,

I use the Twitter Block module as it allows you to specify the number of tweets to display.

Peter

hassebasse’s picture

Hi Peter

Aha, thanks.

Hans

Ludo.R’s picture

I confirm #5 patch allows me to use this module without a widget ID.

Gixxernutter’s picture

Just tried to use this block again, you can't obtain a widget ID key as others have said, so the module won't work.

For easy reference, use this code in a block :

<a class="twitter-timeline" data-dnt="true" data-tweet-limit="1" href="https://twitter.com/YOUR TWEET HANDLE">Tweets by YOUR TWEET HANDLE</a> <script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>

data-tweet-limit="1" : displays the number of tweets that you want to show

Peter

rooby’s picture

Seems like something that needs to be committed

jannis’s picture

RTBC +1

EsmeraldaUBM’s picture

Confirmed as working RTBC +1

ericpoir’s picture

I tested the patch from comment #5 and it seems to be working well.

CiviFirst John’s picture

Please merge this!