Right now, retweets show the retweeted user, making it appear as though I had selected that user to show their tweets. There should be an option for what the behavior should be. Attaching a dead simple patch that also fixes the issue at http://drupal.org/node/1933110 since it's the same line of code. Just adds a variable, "twitter_pull_retweet_user", that is checked before assigning the retweet user as the one to use. Defaults to TRUE so that things don't change on people. No admin interface for setting this variable.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

wbobeirne’s picture

Status: Active » Needs review
FileSize
784 bytes
wbobeirne’s picture

Apologies, left a comment of the original implementation in there. Attaching a new patch without that comment.

wbobeirne’s picture

So it turns out twitter_pull sends in the item as an array with nested arrays, and the twitter module sends it in as an object with nested objects. Simply casting wasn't working because that's not recursive, so I'm attaching a patch that does a json encode/decode to get the whole thing to be an object.

victoriachan’s picture

I've tested this. It works well and fixes the bug caused by $item array/object inconsistency as well (#1933110).

Hope it gets committed.

Thanks!

tinkerbelle’s picture

Another vote for this patch working, fixing #1933110: Incorrect parsing of items. (notices ar thrown), and being something I'd love to see committed!
Thanks wbobeirne!

mfernea’s picture

Status: Reviewed & tested by the community » Needs review

I agree that the patch at #3 solves #1933110: Incorrect parsing of items. (notices ar thrown) too.

elliotttf’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
892 bytes

I had to convert the user to an object for my use case too, but otherwise this worked perfectly.

wbobeirne’s picture

Status: Needs review » Reviewed & tested by the community

#7, json_encode / json_decode recursively converts an array to an object. No need to do it twice.

cdenneen’s picture

@wbobeirne

I've created patch #4 which is the same as your patch #3 but applies cleanly with http://drupal.org/files/typecast_user_variable_in_twitter_class-1781024-...
that contains a patch to fix the lists author issue with 7.x-2.x-dev (http://drupal.org/node/1781024#comment-7232862)

cdenneen’s picture

@wbobeirne

For some reason the git diff got truncated here is the #5 patch which should fix the issue with #4

jec006’s picture

Status: Reviewed & tested by the community » Fixed

Thanks guys, committed here: http://drupalcode.org/project/twitter_pull.git/commit/86d7532

Thanks to all of you

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

joachim’s picture

> No admin interface for setting this variable.

And no documentation either! How is anyone meant to know this exists?

joachim’s picture

Issue summary: View changes

Added link to issue