質問

Google Buzz APIを使用して、Google Buzzアカウントにコンテンツを投稿しようとしています。 私は彼らのサンプルコードを提供したことを使って試してみましたが、それは以下のエラー

を与えました
Array
.

( [HTTP_CODE]=> 401 [ヘッダー]=> array. ( [www-authenticate]=> authsub realm="https://www.google.com/accounts/authsubrequest" ablector-scopes="https://www.googleapis.com/auth/buzz" [content-type]=>アプリケーション/ JSON; charset= UTF-8 [日付]=>火曜日2010年7月20日12:22:05 GMT [有効期限]=> TUE、2010年7月20日12:22:05 GMT [キャッシュコントロール]=>プライベート、マックスエイジ= 0 [x-content-type-options]=> nosniff [Xフレームオプション]=> SameOrigin [X-XSS-PROTECTION]=> 1。モード=ブロック [サーバー]=> GSE. [転送エンコーディング]=>チャンクされました )

[data] => Array
    (
        [error] => Array
            (
                [errors] => Array
                    (
                        [0] => Array
                            (
                                [message] => User must have authorized this application to have the following scope in order to make this call: [https://www.googleapis.com/auth/buzz]  Also , make sure your application is using the Buzz specific OAuth authorization URL.
                                [locationType] => header
                                [location] => Authorization
                            )

                    )

                [code] => 401
                [message] => User must have authorized this application to have the following scope in order to make this call: [https://www.googleapis.com/auth/buzz]  Also , make sure your application is using the Buzz specific OAuth authorization URL.
            )

    )
.

が必要なconfig.phpファイルに変数を追加しました
'site_name' => 'example.com',
.

'oauth_consumer_key'=> 'example.com'、 'OAUTH_CONSUMER_SECRET'=>「ConsumereCret」、 'oauth_rsa_key'=> ''、

誰かが私がここに間違っているかもしれないことを知っていますか??

データベースに返されるトークンを格納する方法は?サーバーが再起動された場合、キャッシュが失われ、ユーザーは再度認証されなければなりません。

役に立ちましたか?

解決

問題は私が通過していたドメインとのものでした。aspement.comを渡す代わりに、私は渡しました http://example.com 。そのため、site_name、oauth_consumer_keyとドメイン変数が正しく渡されていることを確認してください。

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top