0
点赞
收藏
分享

微信扫一扫

QQ或者微薄登录

求阙者 2023-06-04 阅读 14


import com.qq.connect.QQConnectException;
import com.qq.connect.api.OpenID;
import com.qq.connect.api.qzone.UserInfo;
import com.qq.connect.javabeans.AccessToken;
import com.qq.connect.oauth.Oauth;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import weibo4j.Account;
import weibo4j.Users;
import weibo4j.model.WeiboException;
import weibo4j.org.json.JSONException;


@RequestMapping("/oauth/checkqq.jspx")
    public void checkqq(String uid, String from, HttpServletRequest request, HttpServletResponse
            response, org.springframework.ui.Model modelMap) {
        try {
            response.sendRedirect(new Oauth().getAuthorizeURL(request));
        } catch (IOException e) {
            e.printStackTrace();
        } catch (QQConnectException e) {
            e.printStackTrace();
        }
    }

    @RequestMapping("/oauth/checkweibo.jspx")
    public void checkweibo(String uid, String from, HttpServletRequest request, HttpServletResponse
            response, org.springframework.ui.Model modelMap) {
        try {
            response.sendRedirect(new weibo4j.Oauth().authorize("code"));
        } catch (IOException e) {
            e.printStackTrace();
        } catch (WeiboException e) {
            e.printStackTrace();
        }
    }

举报

相关推荐

0 条评论