WeChat gets basic user information. Is the profile picture "cannot be viewed at the moment?

Source: Internet
Author: User
This is the wx. qlogo. Ghost. The figure I see is as follows. In the past, this user's profile picture was normal, but it was recently released...

Is this http://wx.qlogo.cn/mmopen/UAqwJ95HSLycmQktIqAYuexoytJ3kJzknQ4icJkNpfUvxfqoNRDY2esKQj3YvxXuQacsu9fYKDQ1VUSVBxspic4MwNDTF4Z4zu/0

The figure I see is as follows. In the past, the user's profile picture was normal, but recently it was found that he did not change the profile picture.

Will the Avatar address be changed?

Now, I can get him the information again, and the original image url can be used, and I found that the logic has changed: After the user authorized previously, to obtain user information again, you only need to initiatesnsapi_baseThe request is okay.snsapi_userinfoOtherwise, a 48001 error will be reported (api function is not authorized, please confirm that the public account has obtained this interface, you can view the interface permissions on the official website of the public platform-Developer Center page), and initiate a newsnsapi_userinfoWill not pop up the page that requires the user to click authorization, nor will it prompt "you have recently authorized ...".

Now the question is, how can I determine the picture as above? So that I can get his information again in time?

Reply content:

Is this http://wx.qlogo.cn/mmopen/UAqwJ95HSLycmQktIqAYuexoytJ3kJzknQ4icJkNpfUvxfqoNRDY2esKQj3YvxXuQacsu9fYKDQ1VUSVBxspic4MwNDTF4Z4zu/0

The figure I see is as follows. In the past, the user's profile picture was normal, but recently it was found that he did not change the profile picture.

Will the Avatar address be changed?

Now, I can get him the information again, and the original image url can be used, and I found that the logic has changed: After the user authorized previously, to obtain user information again, you only need to initiatesnsapi_baseThe request is okay.snsapi_userinfoOtherwise, a 48001 error will be reported (api function is not authorized, please confirm that the public account has obtained this interface, you can view the interface permissions on the official website of the public platform-Developer Center page), and initiate a newsnsapi_userinfoWill not pop up the page that requires the user to click authorization, nor will it prompt "you have recently authorized ...".

Now the question is, how can I determine the picture as above? So that I can get his information again in time?

Question 1:file_get_contentsCome back ~ Why did you see that image?CurlThis is caused by a header issue. Or use the SDK directly.
Question 2:snsapi_baseIs the Basic permission, only get the nickname avatar, other permissions are not available. Including previousunionidIt's also inexplicably gone. Standardized permissions.snsapi_userinfoIt is user information, except for the Avatar nickname, it has all the permissions for other APIs. As for the reason that you don't need authorization, it's because of a strong cache. The link after the jump is directly cached, and that link is why you are effective, not everyone does not play.
The last question .. Well, if you really need to judge. You can get a graph that is shown like that, and then remember the file content size or md5 .. Just like that ~~ Haha.

Youmu has obtained user information, including the user name and Avatar. Thank you for sharing 742538662 @ qq. com

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.