In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
How to avoid Wechat avatar address invalidation, many novices are not very clear, in order to help you solve this problem, the following editor will explain for you in detail, people with this need can come to learn, I hope you can gain something.
Description of the invalidation of Wechat avatar?
Official documentation-get user's personal information
Officials also advised themselves to keep it and deal with it.
Then we went to google to see if others had been fooled by the same problem.
It seems that many users have encountered related problems.
I often see people's avatars sometimes good and sometimes bad, because it takes a certain amount of time for the old avatar link to fail, one by one from the CDN node. You should now visit the old avatar link, each visit may reach a different CDN node, resulting in occasional.
So how to solve this problem?
We have also come up with a lot of plans on our side. Let's consider several aspects and divide them into two ideas.
Idea 1: save and CDN your local service, but the cost is a little high. Idea 2: there is a strategy to update the avatar regularly.
Update avatar links regularly, don't cache them all the time, for example, update avatar links together when session_key expires.
The backend service regularly checks whether the avatar link is out of date (how to automatically determine whether it is out of date, which will be explained in detail below)
The front end determines whether the avatar is expired according to the avatar link, and re-authorizes to update the avatar information after expiration.
The following introduction, how to determine whether the Wechat avatar is out of date, after research found:
The request information returned by a normal Wechat image is as follows:
But how is the abnormal image address returned?
You can take a look at the exception. The returned information is different. You can judge according to X-Info: notexist:-6101 or X-ErrNo:-6101 keyword.
However, there is another question. If you store it locally, you will also encounter that the address obtained by the user after modifying the avatar may not be up-to-date, although a particularly ugly avatar will not be displayed. How to solve it here? we need to define a policy for the product, which scenarios require regular authorization, update the avatar and user information, and so on.
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.