Hi. The Twitter module is not pulling tweets, shows nothing on user page '/tweets/' or under '/tweets' . On twitter tab (/admin/settings/twitter) the account has been authenticated and is displayed correctly in the list (also has been enabled the checkbox 'tweets' to pull the tweets), but nothing appears under the 'twitter' database table and the table remains empty after execution of cron.

Comments

marthinal’s picture

Status: Active » Needs review
StatusFileSize
new617 bytes

Hi,

I had the same problem in one of our D6 installations.

I have fixed the problem with this patch.

Hope it helps.

Cheers!

cigotete’s picture

Status: Needs review » Fixed

Hi marthinal, thanks, your suggestion has been useful.

marthinal’s picture

Status: Fixed » Needs review

if this is a bug I think should be reviewed.

damienmckenna’s picture

Version: 6.x-5.1 » 6.x-5.x-dev
Issue summary: View changes
marthinal’s picture

Priority: Normal » Major

At least major I think.

damienmckenna’s picture

Status: Needs review » Needs work

Triggering the testbot.

damienmckenna’s picture

Status: Needs work » Needs review

Triggering the testbot.

Status: Needs review » Needs work

The last submitted patch, 1: twitter_user_timeline.patch, failed testing.

steinmb’s picture

Correct me if I'm wrong but are we sure about this? Tested both 7.x-5.x and 6.x-5.x code is identical then it a point was backported from 7.x to 6.x, on clean Drupal installations with 3 twitter accounts. Two auth. and one not.

SELECT twitter_id, created_time FROM twitter;
+--------------------+--------------+
| twitter_id         | created_time |
+--------------------+--------------+
| 550426976843231234 |   1420066992 |
| 550654077013860352 |   1420121137 |
| 550778068286308352 |   1420150699 |
| 550944181766860800 |   1420190303 |
| 550998686072045568 |   1420203298 |
| 551003018100228096 |   1420204331 |
| 551730771086819329 |   1420377841 |
| 551731229415186434 |   1420377950 |
| 551734633067716609 |   1420378761 |
| 551735201723080704 |   1420378897 |
| 551736513298714624 |   1420379210 |
| 551740682839556096 |   1420380204 |
| 551762642407530496 |   1420385439 |
| 552011639177093120 |   1420444805 |
| 552080039639269376 |   1420461113 |
| 552140988744228864 |   1420475644 |
| 552383168809279488 |   1420533384 |
| 552415056282267649 |   1420540987 |
| 552418036544978944 |   1420541698 |
| 552422931339689986 |   1420542865 |
+--------------------+--------------+
20 rows in set (0.00 sec)

How do we actually reproduce this problem?

I agree I'm confused about the code in twitter_fetch_user_timeline(). Calling twitter_connect() with no id only result in the same (first authenticated account) account get called for each twitter account found by the module. I have no idea why it still work?

damienmckenna’s picture

Version: 6.x-5.x-dev » 7.x-6.x-dev
Status: Needs work » Needs review
StatusFileSize
new754 bytes

Lets try this. Ported to 7.x-6.x.

damienmckenna’s picture

Version: 7.x-6.x-dev » 7.x-5.x-dev
StatusFileSize
new754 bytes

Ported to 7.x-5.x.

damienmckenna’s picture

Version: 7.x-5.x-dev » 6.x-5.x-dev
StatusFileSize
new718 bytes

Ported to 6.x-5.x.

damienmckenna’s picture

Version: 6.x-5.x-dev » 7.x-6.x-dev
StatusFileSize
new1.01 KB

I've read through the code. There are a few possible scenarios for the $account to not be able to access the twitter $id's timeline. So this update checks if the $account is authenticated, if so it is used, otherwise it uses the first authenticated account that could be found.

damienmckenna’s picture

StatusFileSize
new1018 bytes

Ported to 7.x-5.x.

damienmckenna’s picture

StatusFileSize
new982 bytes

Ported to 6.x-5.x again.

The last submitted patch, 14: twitter-n2055685-14-7.x-5.x.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 15: twitter-n2055685-15-6.x-5.x.patch, failed testing.

damienmckenna’s picture

Version: 7.x-6.x-dev » 7.x-5.x-dev

damienmckenna’s picture

Status: Needs work » Needs review
StatusFileSize
new1.04 KB

Rerolled for 7.x-5.x.

damienmckenna’s picture

StatusFileSize
new1.12 KB

Rerolled again, better this time.

damienmckenna’s picture

Version: 7.x-5.x-dev » 7.x-6.x-dev
StatusFileSize
new1.13 KB

Rerolled for 7.x-6.x.

damienmckenna’s picture

Version: 7.x-6.x-dev » 6.x-5.x-dev
StatusFileSize
new1.08 KB

Backported to 6.x-5.x.

The last submitted patch, 14: twitter-n2055685-14-7.x-5.x.patch, failed testing.

Mixologic’s picture

Fyi: had to do some bot maintenance the d7 patch may not properly test, and may need a retest.

The last submitted patch, 21: twitter-n2055685-21-7.x-5.x.patch, failed testing.

damienmckenna’s picture

@Mixologic: Thanks for letting me know, we'll see how the latest patches work out.

The last submitted patch, 23: twitter-n2055685-23-7.x-6.x.patch, failed testing.

damienmckenna’s picture

Status: Needs review » Fixed

Committed.

  • DamienMcKenna committed 5b3dabd on
    Issue #2055685 by DamienMcKenna, marthinal: API calls for authenticated...

  • DamienMcKenna committed 3f90188 on
    Issue #2055685 by DamienMcKenna, marthinal: API calls for authenticated...

  • DamienMcKenna committed 39abb39 on 7.x-6.x
    Issue #2055685 by DamienMcKenna, marthinal: API calls for authenticated...

Status: Fixed » Closed (fixed)

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