summaryrefslogtreecommitdiff
path: root/protocols/Twitter/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-08-01 17:00:31 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-08-01 17:00:36 +0300
commitf3350f5b892a4809faf0703e81cc865190572648 (patch)
tree2c66a540befa58e1496c178b1338a5c20f18cd65 /protocols/Twitter/src
parentfe58b618297fcd01fdfcd42fa93ba10ead8c336c (diff)
NewStory: translateable default value
Diffstat (limited to 'protocols/Twitter/src')
-rw-r--r--protocols/Twitter/src/connection.cpp2
-rw-r--r--protocols/Twitter/src/http.h2
-rw-r--r--protocols/Twitter/src/utility.cpp2
3 files changed, 2 insertions, 4 deletions
diff --git a/protocols/Twitter/src/connection.cpp b/protocols/Twitter/src/connection.cpp
index 50d9fd6ad0..bb3d36c620 100644
--- a/protocols/Twitter/src/connection.cpp
+++ b/protocols/Twitter/src/connection.cpp
@@ -348,7 +348,7 @@ void CTwitterProto::UpdateAvatar(MCONTACT hContact, const CMStringA &url, bool f
void CTwitterProto::UpdateFriends()
{
- auto *req = new AsyncHttpRequest(REQUEST_GET, "/friends/list.json");
+ auto *req = new AsyncHttpRequest(REQUEST_GET, CMStringA(FORMAT, "/2/users/%s/followers", m_szMyId.c_str()));
http::response resp = Execute(req);
if (resp.code != 200) {
debugLogA("Friend list reading failed");
diff --git a/protocols/Twitter/src/http.h b/protocols/Twitter/src/http.h
index db0f2204b0..dc5c5debed 100644
--- a/protocols/Twitter/src/http.h
+++ b/protocols/Twitter/src/http.h
@@ -19,8 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
-#define TWITTER_BASE_URL "https://api.twitter.com/1.1"
-
namespace http
{
struct response
diff --git a/protocols/Twitter/src/utility.cpp b/protocols/Twitter/src/utility.cpp
index 06b8c10c65..3d380b85a8 100644
--- a/protocols/Twitter/src/utility.cpp
+++ b/protocols/Twitter/src/utility.cpp
@@ -23,7 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
http::response CTwitterProto::Execute(AsyncHttpRequest *pReq)
{
if (pReq->m_szUrl[0] == '/')
- pReq->m_szUrl.Insert(0, TWITTER_BASE_URL);
+ pReq->m_szUrl.Insert(0, "https://api.twitter.com/2");
bool bIsJson = false;
if (!pReq->m_szParam.IsEmpty()) {