이 페이지에서

Reddit 예시

OAuth 2를 사용하여 Reddit에 액세스하는 인증 과정을 보여줍니다.

예시 스크린샷

이 Reddit 예제는 Qt Network Authorization에서 지원하는 OAuth 2를 사용하여 Reddit에 로그인하고, 인증된 사용자와 관련된 Reddit 게시물(텍스트 형식)을 표시합니다.

이 예제를 사용하려면 Reddit의 소비자 키가 필요합니다. 애플리케이션을 등록하려면 https://www.reddit.com/prefs/apps/을 방문하십시오.

참고: 애플리케이션을 생성할 때 ‘설 치형 앱(installed app ) ’을선택하십시오 .

참고: Reddit 설정에서 리디렉션 URI를 http://localhost:1337/ 로설정하십시오 .

예제 실행

다음에서 예제를 실행할 수 있습니다.

실행하기 전에, --client-id 를 실행 파일 명령줄에 추가하고, 그 뒤에 https://www.reddit.com/prefs/apps/에서 확인한 소비자 키를 입력하십시오.

code.qt.io의 예제 프로젝트

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.