I cannot seem to find a way to display the full twitter feed including retweets. Currently all the feed pulls only show actual tweets and not retweets. Is there a way to show everything??
| Comment | File | Size | Author |
|---|---|---|---|
| #16 | Screenshot.png | 108 KB | juampynr |
| #4 | twitter.patch | 2.57 KB | nobodyiscertain |
Comments
Comment #1
fregan commentedMy bad. I did not realize that twitter excludes retweets from the XML and JSON calls by default. http://dev.twitter.com/doc/get/statuses/user_timeline
So with that, anyone have a good suggestion on how to place the include_rts parameter in the call?? What file would I change to get this to happen?
Comment #2
goins.29 commentedI just recently ran into this problem, and this is what I did to get it to work.
In the twitter.inc file, I changed the twitter_fetch_timeline definition to include a new optional parameter, $include_retweets, then slightly modified the "since" query string append like so:
Under the twitter setup in site configuration, I changed the Alternate API URL from the default value I had of "twitter.com" to "api.twitter.com/1".
After that, I just updated my calls to twitter_fetch_timeline($account_name) to twitter_fetch_timeline($account_name, TRUE, TRUE, TRUE). Of course, if you are always going to want re-tweets (or at least by default), you can just set the default value of $include_retweets to TRUE, then just use twitter_fetch_timeline($account_name).
I'm still a little green with PHP, so feel free to edit/enhance my code as needed...
Comment #3
nancydruCan you do a patch, please? Did you set up any kind of admin setting?
Comment #4
nobodyiscertain commentedHere's a patch I created off of goins.29's code.
I did add an admin setting in the Twitter settings to Import Retweets. Make sure you change the "twitter.com" value in Alternate API URL to "api.twitter.com/1" and you'll be good to go.
Comment #5
JStarcher commentedThanks!
Comment #6
nancydruThis ends up being in the code twice?
Drupal coding standards say no tabs, please. Two spaces instead.
Comment #7
nancydruI am not a Twitterer, so I may be looking at the wrong stuff, but my tester says the re-tweets are not showing up. I have run cron, just in case.
I did click on "Import Retweets" and set the "Alternate API URL" to "api.twitter.com/1".
Comment #8
nancydruAny other ideas?
Comment #9
Gilneas commentedI did apply this patch and it seems retweets are working right now.
I will have my eyes on this and give feedback.
Comment #10
nancydruEven though I ran Cron when I put this in, it seems to have taken some more cycles to show them.
Comment #11
Dubber Dan commentedGoing to give this a whirl running the patch, so will report back
Comment #12
Gilneas commentedPatch works for me.
Comment #13
geufroi commentedI have only few month of drupal experience...
I don't know how to apply a patch
could you be kind enough to give us the "how to" guide to process to apply this patch.
If thats time consuming to you, please provide few key steps...
thanks again
Comment #14
nancydruBetter yet, commit the patch.
Comment #15
steinmb commentedPls. reroll against latest 6.x-3 dev.
Comment #16
juampynr commentedIn June of this year an "Include retweets" option was added to the module.
Please upgrade to the latest stable release available at http://drupal.org/project/twitter.
Comment #17
juampynr commentedChanging status as fixed.
Comment #18
rene_w commented"Fixed"? I can't seem to get retweets to show up -- the "Reweets" checkbox doesn't change anything for me. On the Twitter web site, all the retweets are visible. The other tweets are shown.
I've just tried installing twitter-6.x-3.0-beta9 (on Drupal 6.22), re-ran cron, deleted and re-added the Twitter account, but no luck. Any suggestions on how to debug this?
Comment #19
rene_w commentedOk, I found this thread #1182170: Import Twitter-style Retweets on cron run and the patch described @#10 (using api.twitter.com/1) also worked for me. FWIW, I'm using the module without OAuth and it were the "native" Twitter retweets that didn't show up.
Comment #20
steinmb commentedGlad that quick fix worked out for you. Pls. join in at #1182170: Import Twitter-style Retweets on cron run, have your say, test patches so we are sure that it get fixed (one more time).