Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The new twitter API 1.1 says that the used method to retrieve the tweets is deprecated.
Comment | File | Size | Author |
---|---|---|---|
#14 | Screen Shot 2014-10-20 at 11.27.05 AM.png | 192.17 KB | seanr |
#6 | 1942640-6-socialmedia-update-twitter-widget.patch | 2.95 KB | fenstrat |
#4 | socialmedia-new-twitter-profile-widget-1942640-4.patch | 3.01 KB | mdixoncm |
Comments
Comment #1
lokapujyaFurthermore, the new twitter widgets (called Twitter Timelines) seem to use an iFrame so you can't apply CSS to the iFrame. Plus, they don't seem to be as configurable as the old widgets. So is the solution to use the API?
Comment #2
slamorte CreditAttribution: slamorte commentedSeriously, not a single person has a fix or comment for this? Isn't this a core feature of this module?
I've hacked at this as best as I can but I have no idea how to get Twitter's new code working with the Social Media module.
Comment #3
slamorte CreditAttribution: slamorte commentedUPDATE: Here's a work-around.
Go to https://twitter.com/settings/widgets. Make yourself a Twitter widget, customizing the settings you want here.
Copy the embed code from your widget page.
Create a new block.
Paste the embed code into the block. Make sure you've got a WYSIWYG text format that can accept unrestricted code.
Save your block, place it in a region. That's it, you'll have your twitter feed wherever your block is placed.
Comment #4
mdixoncm CreditAttribution: mdixoncm commentedI've put together the beginnings of a small patch to allow the twitter-profile widget to work again ... needs some further testing ...
Comment #5
nlambert CreditAttribution: nlambert commentedThe twitter timeline widget is now authenticated:
https://dev.twitter.com/discussions/18458
i.e.: you must create it from your account (read: it must exist in your account):
http://twitter.com/settings/widgets
Not sure where to begin :
Should the twitter profil have a "paste box" for that info? admin/config/media/socialmedia/profiles
OR
Should the twitter widget have that info? admin/structure/widgets/sets/edit/twitter-profile-widget
I'm not familiar with the widget api.
Comment #6
fenstratAttached is a reroll of #4 with the addition of a description that outlines the need to create and configure the widget at https://twitter.com/settings/widgets
Like @nlambert I am unfamiliar with the widgets module so am not sure if this is the best place to override. admin/config/media/socialmedia/profiles relates to all profile settings how however this is a widget specific setting and so the patch goes with the idea of editing the widget at admin/structure/widgets/sets/edit/twitter-profile-widget
At the very least this makes the twitter widget functional again.
Comment #7
dan.mantyla CreditAttribution: dan.mantyla commentedFor my site I need a twitter widget for each of my authors/hosts's profile page. I thought maybe a workaround was to add a field for user profiles and add the embed code, but any authenticated user would have the same field because there's no control between role to role, and obviously we don't want any user to add javascript code.
Comment #8
dooug CreditAttribution: dooug commentedThe patch from #6 worked in my case.
Also, this didn't work without the twitter widget ID entered. So, it should be clear that this patch requires the twitter profile widget to be reconfigured.
The twitter widget id token defaults to 0, but in my case this didn't work and the widget id was required. Why does it have a default if the widget id is required? Or am I mistaken?
settings:twitter_widget_id=0
Comment #9
davidneedhamThe patch in #6 works for me and applies cleanly against dev.
Comment #10
davidneedhamThis patch is SO close. It works great for the site-wide Twitter feed. But if you view the feed on a user profile, it flashes "Tweets by " [my personal twitter handler], but then it updates to show tweets by the website instead.
The personal feed will require each person to enter the widget ID just as the site-wide form does. Perhaps it could be optional so that they could leave out the widget ID to benefit from their personal twitter link without the feed?
Comment #11
enap CreditAttribution: enap commentedI applied the patch from #6 however I'm still getting the deprecated API error, am I missing something?
Comment #12
seanrI'm very confused - I applied the patch from #6, but I don't see anywhere to put the twitter widget ID. Neither path mentioned in #6 contains that field even though I have confirmed this code is in my patched module:
WTF? ;-)
Comment #13
davidneedham@seanr
You have to edit the default Twitter widget (Structure > Widgets).
Comment #14
seanrI'm on what I think is the right page, but I don't see any field for that. See here.
Comment #15
davidneedham@seanr from that page you must click the override defaults button at the bottom, and then edit the twitter profile widget.
Comment #16
TomDude48 CreditAttribution: TomDude48 commentedI have done a lot of updates to this module as a part of client work. The new Twitter API is one of those fixes. I went ahead and pushed the latest version so you would have the fix.
I have not gotten a lot of time to test the module outside of Open Enterprise, so I just pushed it to 7.x-1.x-dev branch. If we can get some testing in, I will create a new release.
Comment #17
seanrAha. That worked. Thanks. This definitely needs better documentation, though. ;-)
Comment #18
rudyard55 CreditAttribution: rudyard55 commented@TomDude48 I apologize, but I'm not tracking on what I'm supposed to populate the field labeled "Twitter user timeline widget id " with in the dev version. Where do I find the id?
Comment #19
TomDude48 CreditAttribution: TomDude48 commentedI haven't looked at that in Twitter in a while. I think the interface has changed so it is not as straight forward figuring out what your id is.
But if you setup a widget in Twitter and look at the embed code. It is the value for the data-widget-id attribute. For example in this embed code the id would be 123456789: