summary refs log tree commit diff
path: root/bin
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-07-08 19:09:45 +0000
committerJune McEnroe <june@causal.agency>2020-07-08 19:09:45 +0000
commit50c16c987bb228497f258b19cbbf60a55f1930ea (patch)
tree8128663bddb135847ac9f4b917e183b09775d590 /bin
parentTweak causal.agency for mostly no reason (diff)
downloadsrc-50c16c987bb228497f258b19cbbf60a55f1930ea.tar.gz
src-50c16c987bb228497f258b19cbbf60a55f1930ea.zip
Add facebook and twitter to title user-agent
This fixes fetching tweets again!

https://github.com/thelounge/thelounge/pull/ 3602

(Intentionally breaking the link so GitHub doesn't add a "referenced
this PR" thing?)
Diffstat (limited to 'bin')
-rw-r--r--bin/title.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/title.c b/bin/title.c
index 9cf444e8..366289da 100644
--- a/bin/title.c
+++ b/bin/title.c
@@ -158,7 +158,10 @@ int main(int argc, char *argv[]) {
 	curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, error);
 
 	curl_easy_setopt(curl, CURLOPT_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
-	curl_easy_setopt(curl, CURLOPT_USERAGENT, "curl/7.54.0");
+	curl_easy_setopt(
+		curl, CURLOPT_USERAGENT,
+		"curl/7.54.0 facebookexternalhit/1.1 Twitterbot/1.0"
+	);
 	curl_easy_setopt(curl, CURLOPT_ACCEPT_ENCODING, "");
 	curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
 	curl_easy_setopt(curl, CURLOPT_MAXREDIRS, 3L);