Oau22-how to use the phpsdk officially provided by Sina Weibo to debug Weibo logon locally

Source: Internet
Author: User
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:

  1. Set the security domain name local. host in the Management Center
  2. Set the ip address of local. host to 127.0.0.1 locally.
  3. The callback address and test address are all under the domain name "local. host ".

Test:

  1. Download the official php sdk specified by Sina Weibo
  2. Modify the config file, fill in akey and skey, And the callback address is: http://local.host/weibo/callback.php
  3. Visit http://local.host/weibo/and open the microblogs link on the page.
  4. 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:

  1. Set the security domain name local. host in the Management Center
  2. Set the ip address of local. host to 127.0.0.1 locally.
  3. The callback address and test address are all under the domain name "local. host ".

Test:

  1. Download the official php sdk specified by Sina Weibo
  2. Modify the config file, fill in akey and skey, And the callback address is: http://local.host/weibo/callback.php
  3. Visit http://local.host/weibo/and open the microblogs link on the page.
  4. 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:

  1. Create a website project in the Management Center
  2. Bind the host modification method of the domain name to 127.0.0.1
  3. 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

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.