Accessing the Twitter Streaming API with C

后端 未结 2 1748
佛祖请我去吃肉
佛祖请我去吃肉 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:26

    edit:I think the difference between using google.com and the twitter API is that in this case you are trying to specify a password with " -u user:pass". Nowhere in the CURL API do I see this technique mentioned.

    Instead pass the user and pass separately with an additional curl_easy_setopt(curl, CURLOPT_USERPWD, "user:pass") as described in section "NAMES and PASSWORDS OPTIONS" at http://curl.haxx.se/libcurl/c/curl_easy_setopt.html

提交回复
热议问题