Changes in protocols/twitter/twitter_lib.c [c2ecadc:7d53efb]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/twitter/twitter_lib.c
rc2ecadc r7d53efb 626 626 627 627 /** 628 * Callback after sending a new updateto twitter.629 */ 630 static void twitter_http_post _status(struct http_request *req)628 * Callback to use after sending a post request to twitter. 629 */ 630 static void twitter_http_post(struct http_request *req) 631 631 { 632 632 struct im_connection *ic = req->data; … … 639 639 if (req->status_code != 200) { 640 640 // It didn't go well, output the error and return. 641 imcb_error(ic, " Could not post message... HTTPSTATUS: %d", req->status_code);641 imcb_error(ic, "HTTP Error... STATUS: %d", req->status_code); 642 642 return; 643 643 } … … 654 654 args[0] = "status"; 655 655 args[1] = msg; 656 twitter_http(TWITTER_STATUS_UPDATE_URL, twitter_http_post _status, ic, 1, td->user, td->pass, td->oauth_info, args, 2);656 twitter_http(TWITTER_STATUS_UPDATE_URL, twitter_http_post, ic, 1, td->user, td->pass, td->oauth_info, args, 2); 657 657 // g_free(args[1]); 658 658 } … … 672 672 args[3] = msg; 673 673 // Use the same callback as for twitter_post_status, since it does basically the same. 674 twitter_http(TWITTER_DIRECT_MESSAGES_NEW_URL, twitter_http_post _status, ic, 1, td->user, td->pass, td->oauth_info, args, 4);674 twitter_http(TWITTER_DIRECT_MESSAGES_NEW_URL, twitter_http_post, ic, 1, td->user, td->pass, td->oauth_info, args, 4); 675 675 // g_free(args[1]); 676 676 // g_free(args[3]); 677 677 } 678 679 void twitter_friendships_create_destroy(struct im_connection *ic, char *who, int create) 680 { 681 struct twitter_data *td = ic->proto_data; 682 683 char* args[2]; 684 args[0] = "screen_name"; 685 args[1] = who; 686 twitter_http(create ? TWITTER_FRIENDSHIPS_CREATE_URL : TWITTER_FRIENDSHIPS_DESTROY_URL, twitter_http_post, ic, 1, td->user, td->pass, td->oauth_info, args, 2); 687 } 688 689 690
Note: See TracChangeset
for help on using the changeset viewer.