php - Where should the obtained WeChat user nickname and avatar be saved?
我想大声告诉你
我想大声告诉你 2017-05-16 13:00:32
0
4
1276

In the project, you need to obtain the WeChat user's avatar and nickname. If the nickname and avatar URL are saved in the database, the information will not be updated in time, and the original URL will become invalid after changing the avatar. Should I download the avatar locally? What if other methods are used? Which method is more reasonable?

我想大声告诉你
我想大声告诉你

reply all(4)
黄舟

H5 local storage

大家讲道理

Each OpenID used is unique and needs to be stored in the database. The avatar nickname may change and the expiration time of the stored session setting is changed. Personal opinion

过去多啦不再A梦

Be sure to save the database, including openid. If you have high requirements for updating your WeChat username and avatar, make scheduled tasks to update them regularly.
If you only need to update the avatar, access the avatar address regularly. If it does not exist, call the interface to query WeChat user information and update the database.

左手右手慢动作

I also encountered this problem. When logging in with WeChat, the avatar of the WeChat user is captured, but what should I do if the user changes the avatar?

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template