Skip to content

Streaming api and timeout #11

@iwkse

Description

@iwkse

Hi, I'm trying to use the streaming api, in the specific I'm using this

https://dev.twitter.com/streaming/reference/get/user

to get the timeline and I have it coded like this:

function user_timeline($token) {
        $tmhOAuth = new tmhOAuth($token);

        $code = $tmhOAuth->streaming_request(
            'GET',
            'https://userstream.twitter.com/1.1/user.json',
             array(),
            'user_timeline_callback'
);

        if ($code == 200) {
            echo $tmhOAuth->response['response'];
            error_log ("CODE 200: OK: user timeline" . $tmhOAuth->response['response']);
        }
        else {
            echo json_decode("Error");
            error_log ("CODE ERROR: " . $tmhOAuth->response['response']);
        }
}

In the callback I only print the args for now.

After several seconds I get a upstream timeout error (110)

do you have a clue?

Thx

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions