Hi!
I created a simple Rule that search "drupal" in Twitter, display a Warning drupal system message with:
"A new tweet was published about Drupal:\r\n[tweet:text]".

First cron treatment went great.

Subsequent treatment trigger this Guzzle error message:

Guzzle\Service\Exception\ValidationException: Validation errors: [since_id] must be of type integer in Guzzle\Service\Command\AbstractCommand->validate() (line 358 of /home/alexandre/hbgt.fr/fluxkraft/sites/all/vendor/guzzle/guzzle/src/Guzzle/Service/Command/AbstractCommand.php).

Should I add a condition? a value in the Rule?
Did I miss something else?

Thank you.
Alexandre

Comments

sashainparis’s picture

Issue summary: View changes

better code display

sashainparis’s picture

I had it by to work changing the Json file and describing Since_id type as "" (so no condition to validate).

But Twitter API v1.1 definitly say:
https://dev.twitter.com/docs/api/1.1/get/search/tweets

Returns results with an ID greater than (that is, more recent than) the specified ID. There are limits to the number of Tweets which can be accessed through the API. If the limit of Tweets has occured since the since_id, the since_id will be forced to the oldest ID available.

Example Values: 12345

Something must be wrong here. The since_id value must not be the one expected.

sashainparis’s picture

Component: Miscellaneous » Code
Category: support » bug
criz’s picture

Status: Active » Closed (works as designed)

We have changed some code here just before DrupalCon. First cron run should only return the last tweet. The second cron run returns all tweets since then. Just to go sure that actions don't effect tweets from the past, can be very dangerous...

Please report if you experience troubles here with latest code.

criz’s picture

Issue summary: View changes

typo

skorzh’s picture

Issue summary: View changes
Status: Closed (works as designed) » Active

Have the same an error.
The possible cause of the error:
[since_id] is too long for the integer type if you use 32-bit builds of PHP, because

32-bit builds of PHP:
Integers can be from -2147483648 to 2147483647

64-bit builds of PHP:
Integers can be from -9223372036854775808 to 9223372036854775807

example of [since_id]: 435369524938817536

you can check it, if you output dpm(435369524938817536); on your site, it outputs:
for 32-bit builds of PHP: 4.3392976229867E+17
for 64-bit builds of PHP: 435369524938817536

Check your PHP_INT_SIZE and PHP_INT_MAX constants, PHP_INT_SIZE for 64-bit is 8, for 32-bit is 4.

I have tested the same code at 32-bit and 64-bit builds, and it works good for 64 and don't work for 32.
I used fluxservice (7.x-1.0-rc1) + fluxtwitter (7.x-1.0-beta2) modules.

criz’s picture

Confirming this issue of too long values for [since_id] on some systems.

sashainparis’s picture

Status: Active » Closed (outdated)