Accessing the Twitter Streaming API with C

后端 未结 2 1726
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-14 15:45

I\'m trying to access the Streaming API with C, and am using the following code:

#include 
#include 

int main(void)
{
  C         


        
2条回答
  •  星月不相逢
    2021-01-14 16:03

    The function curl_easy_perform() only returns the error code. To actually retrieve the data you'll have to set CURLOPT_WRITEFUNCTION to your own callback function.

    Edit: You also can't use " -uJEggers2:password" in the URL string, you'll have to set the authentication options using CURLOPT_HTTPAUTH, CURLOPT_USERNAME and CURLOPT_PASSWORD.

提交回复
热议问题