Reddit 示例

演示使用 OAuth 2 验证访问 Reddit。

示例截图

Reddit示例使用Qt Network 授权支持的 OAuth 2 登录 Reddit,并显示与认证用户相关的 Reddit 帖子(文本格式)。

要使用此示例,需要 Reddit 提供消费者密钥。要注册应用程序,请访问 https://www.reddit.com/prefs/apps/。

注: 创建应用程序时选择已安装的应用程序

注: 在 Reddit 设置中将重定向 URI 设置为http://localhost:1337/

运行示例

要从 Qt Creator,打开Welcome 模式,然后从Examples 中选择示例。更多信息,请参阅Qt Creator: 教程:构建并运行

示例项目 @ code.qt.io

© 2025 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.