Original link: https://5ime.cn/sinaurl.html
 In fact, as early as 2018年I wrote that PHP calls Sina API to generate short URLs , but 2020年Weibo released an announcement on the implementation of the external chain whitelist mechanism on the Weibo platform , restricting that only白名单内域名can be generated normally. , the非白名单域名jump will show a prompt message, and you can continue to jump after clicking the继续访问button.
 Recently, someone asked me to write about the generation of t.cn short links. The other party is only used to shorten QQ群加群链接, so there is no whitelist problem, because qq.com must exist in the whitelist.
We directly generate the short URL of Weibo by posting a comment, and then automatically delete the comment just posted.
get MID
 Briefly talk about the method of each version of Weibo to obtain Weibo MID
Mobile version
1  | 
 
 | 
PC version
1  | 
 
 | 
 Access the Weibo API to get the MID
1  | 
 
 | 
 In the returned json data, id / idstr / mid are all microblog MID
International Edition
1  | 
 
 | 
source code
 Fill in the SUB fields in your Weibo mid and Weibo Cookie (all are also fine).
1  | 
 
 | 
 This article is reprinted from: https://5ime.cn/sinaurl.html
 This site is for inclusion only, and the copyright belongs to the original author.