I just switched a client's site from the Twitter Pull module to using Twitter/OAuth because of the changes in the Twitter API. Everything is working well - I have the twitter feed displayed in a block on the home page with the profile pictures of the Twitter accounts associated with the client's Twitter feed. There is one unexpected behavior though. When displaying the client's tweets, their twitter profile picture is displayed next to the tweet. When displaying people that tweeted @ the client, the profile pic for the account that tweeted @ my client is being displayed. However, when my client retweets another users tweets, my client's profile picture is displayed. I would expect the profile picture of the source of the original tweet to be displayed.
For demonstration's sake, see the retweet from my client's account (twitter-retweet.png) as displayed on my client's Twitter feed at https://twitter.com/JSAMarketing,
with the retweet as displayed on my client's website (block-retweet.png) http://jamesstreetassoc.com/.
I hoped that the profile pics could be the same on the twitter profile page and the website, but that's not what I'm seeing. Is there any way to display the profile picture of the original twitter account, as opposed to the profile pic of the person who simply retweeted that tweet?
Comment | File | Size | Author |
---|---|---|---|
#10 | twitter-avatar-being-retweeted-2022717-10.patch | 966 bytes | rutiolma |
| |||
#8 | twitter-avatar-being-retweeted-2022717-8.patch | 824 bytes | intrafusion |
| |||
block-retweet.png | 27.54 KB | kbrinner | |
twitter-retweet.png | 25.86 KB | kbrinner |
Comments
Comment #1
intrafusionI had the same issue when using the results provided through Views, however I found by adding the following code I managed to solve the problem, perhaps this could be included
This code goes in twitter_views_field_handlers.inc after
Comment #2
valgibson CreditAttribution: valgibson commentedCreated a patch. Only works when a 'formatted tweet'-field is being rendered with Views.
Sorry, attachment name of the patch should have been "twitter-avatar-being-retweeted-2022717-7739815.patch"
Comment #3
DamienMcKennaThanks for the patch. Please remember to change the status to "needs review" when you do upload a patch, otherwise people might not see it.
Comment #5
_wdm_ CreditAttribution: _wdm_ commentedAn alternate approach is to handle it in a custom module with something like:
That class is based on the twitter_views_handler_field_formatted_tweet class and comment #1
NOTE: you must have an account configure as global at admin/config/services/twitter
Comment #6
frankdesign CreditAttribution: frankdesign commentedI know the solution at Comment #1 is a hack but it did work (at least it did on previous releases of Twitter). But it doesn't work on 7.x-5.11 or 7.x-6.2. I also tried the custom module solution but I can't seem to get that working with the current releases either.
Anybody got any other ideas? Really would like to solve this issue.
Thanks
F
Comment #7
thatguy CreditAttribution: thatguy commentedI used the previous solutions but instead wanted to use the Profile image field so I modified them a bit. Also make sure one twitter account on your page has the "General" option selected at the admin/config/services/twitter options page.
Comment #8
intrafusionPatch from #2 re-rolled against 7.x-5.x-dev
Comment #9
rutiolma#8 works nicely
Comment #10
rutiolmaUnfortunately the previous patch didn't fully work.
It does work for RT of website defined accounts, not for other non-defined accounts.
I'm attaching a patch, almost the same as #8 but forcing a twitter authentication. Since this will just load a twitter account information for the RT, this doesn't seem to pose a security issue.
Comment #11
andrey.troeglazov CreditAttribution: andrey.troeglazov at DrupalJedi commentedComment #14
andrey.troeglazov CreditAttribution: andrey.troeglazov at DrupalJedi commentedCommited both to 7.5 and 7.6 dev branches.
Comment #15
andrey.troeglazov CreditAttribution: andrey.troeglazov at DrupalJedi commentedComment #17
DamienMcKennaComment #18
DamienMcKenna