このページでは

Reddit の例

RedditにアクセスするためのOAuth 2による認証の仕組みを説明しています。

例のスクリーンショット

このRedditのサンプルでは、Redditがサポートしている Qt Network AuthorizationRedditにサインインし、認証されたユーザーに関連付けられたRedditの投稿(テキスト形式)を表示します。

このサンプルを使用するには、Reddit からのコンシューマーキーが必要です。アプリケーションを登録するには、https://www.reddit.com/prefs/apps/ にアクセスしてください。

注: アプリケーションを作成する際は、「インストール済みアプリ」を選択してください 。

注: 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.