关于开发QQ登陆的功能的问题,本地如何测试?

WBOY
Release: 2016-06-23 13:42:08
Original
1098 people have browsed it

目前在开发QQ一键登陆,即用QQ号码直接登陆论坛的功能,但是如果用 localhost 来做回调域名的话,根本没办法测试会提示:

'redirect_uri' 的错误,即必须用绑定的那个域名来测试,但是我希望本地来测试,请问怎么办?


回复讨论(解决方案)

P哥,随便填个baidu什么的就好,如果你是要得到回调域名里返回的参数

调试的时候本地配置虚拟主机

P哥,随便填个baidu什么的就好,如果你是要得到回调域名里返回的参数



我誓死捍卫你说话的权利,但是很明显你的说法并不成立

你要进QQ空间开发者应用,申请appkey,就可以了。

回调地址 你是在QQ那边填写的吧? 那有什么办法呢。
或者你可以去LS说的QQ空间开发者应用那里 下载一个oauth协议的phpWebservice 记得里面有两个版本 你选一个 下载下来 根据说明文档 架在本地上做开发做测试先。
http://wiki.opensns.qq.com/wiki/%E3%80%90QQ%E7%99%BB%E5%BD%95%E3%80%91SDK%E4%B8%8B%E8%BD%BD

配置redirectURI  =  www.你填的域名.com?url="http:192.168.1.本地IP:8080/跳转方法"

就可以测试了

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!