My practice is: Set the security domain name local in the management center. host local settings. the ip address of the host is 127.0.0.1callback and the test ip address is in the local directory. test under the host domain name: Download the official PHPSDK file specified by Sina Weibo to modify the config file, and fill in akey and ske... my approach is:
- Set the security domain name local. host in the Management Center
- Set the ip address of local. host to 127.0.0.1 locally.
- The callback address and test address are all under the domain name "local. host ".
Test:
- Download the official php sdk specified by Sina Weibo
- Modify the config file, fill in akey and skey, And the callback address is: http://local.host/weibo/callback.php
- Visit http://local.host/weibo/and open the microblogs link on the page.
- An error occurred while redirecting to the page.
Error message:
Access Error! Your website fails to be authenticated on Sina Weibo. Please contact xx or try again later. (Error: redirectUriMismatch)
How can this problem be solved? Is there any way to debug and test Weibo logon locally?
Reply content:
My approach is:
- Set the security domain name local. host in the Management Center
- Set the ip address of local. host to 127.0.0.1 locally.
- The callback address and test address are all under the domain name "local. host ".
Test:
- Download the official php sdk specified by Sina Weibo
- Modify the config file, fill in akey and skey, And the callback address is: http://local.host/weibo/callback.php
- Visit http://local.host/weibo/and open the microblogs link on the page.
- An error occurred while redirecting to the page.
Error message:
Access Error! Your website fails to be authenticated on Sina Weibo. Please contact xx or try again later. (Error: redirectUriMismatch)
How can this problem be solved? Is there any way to debug and test Weibo logon locally?
Solution:
- Create a website project in the Management Center
- Bind the host modification method of the domain name to 127.0.0.1
- Enter the akey, skey, and the corresponding callback address to test Weibo logon.
In the hosts file, public network binding local test environment, that is 127.0.0.1, reference, http://www.oooink.com/blog/find/c/47