Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Streaming api and timeout #11

Open
iwkse opened this issue Jan 13, 2016 · 0 comments
Open

Streaming api and timeout #11

iwkse opened this issue Jan 13, 2016 · 0 comments

Comments

@iwkse
Copy link

iwkse commented Jan 13, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant