Changeset 686ac51 for protocols/twitter
- Timestamp:
- 2018-03-12T02:08:42Z (7 years ago)
- Branches:
- master
- Children:
- 7a99a0c
- Parents:
- a949b43
- git-author:
- dequis <dx@…> (11-03-18 22:20:44)
- git-committer:
- dequis <dx@…> (12-03-18 02:08:42)
- Location:
- protocols/twitter
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/twitter/twitter.c
ra949b43 r686ac51 360 360 }; 361 361 362 static const struct oauth_service identica_oauth = {363 "https://identi.ca/api/oauth/request_token",364 "https://identi.ca/api/oauth/access_token",365 "https://identi.ca/api/oauth/authorize",366 .consumer_key = "e147ff789fcbd8a5a07963afbb43f9da",367 .consumer_secret = "c596267f277457ec0ce1ab7bb788d828",368 };369 370 362 static gboolean twitter_oauth_callback(struct oauth_info *info); 371 363 372 364 static const struct oauth_service *get_oauth_service(struct im_connection *ic) 373 365 { 374 struct twitter_data *td = ic->proto_data; 375 376 if (strstr(td->url_host, "identi.ca")) { 377 return &identica_oauth; 378 } else { 379 return &twitter_oauth; 380 } 366 return &twitter_oauth; 381 367 382 368 /* Could add more services, or allow configuring your own base URL + … … 391 377 imcb_log(ic, "Requesting OAuth request token"); 392 378 393 if (!strstr(url, "twitter.com") && !strstr(url, "identi.ca")) { 394 imcb_log(ic, "Warning: OAuth only works with identi.ca and " 395 "Twitter."); 379 if (!strstr(url, "twitter.com")) { 380 imcb_log(ic, "Warning: OAuth only works with Twitter."); 396 381 } 397 382 … … 540 525 def_tul = "23"; 541 526 def_mentions = "true"; 542 } else { /* if( strcmp( acc->prpl->name, "identica" ) == 0 ) */543 def_url = IDENTICA_API_URL;527 } else { 528 def_url = ""; 544 529 def_tul = "0"; 545 530 def_mentions = "false"; -
protocols/twitter/twitter_lib.h
ra949b43 r686ac51 30 30 31 31 #define TWITTER_API_URL "https://api.twitter.com/1.1" 32 #define IDENTICA_API_URL "https://identi.ca/api"33 32 34 33 /* Status URLs */
Note: See TracChangeset
for help on using the changeset viewer.