表达式或语句中出现意外标记“sha1”。用于为 Facebook 开发者帐户应用程序生成密钥哈希

Bho*_*iya 0 android facebook-graph-api

我正在尝试为我集成了 facebook 登录的应用程序生成密钥哈希

对于 generationg keyhash,我根据 facecook 文档使用下面的代码

> C:\Program Files\Java\jdk1.8.0_111\bin> keytool -exportcert -alias androiddebugkey -keystore "C:\Users\Akash\.android \debug.keystore" |"C:\OpenSSL\bin\openssl" sha1 -binary | "C:\OpenSSL\bin\openssl" base64
Run Code Online (Sandbox Code Playgroud)

但它向我显示了如下错误:

At line:1 char:97
+ ... ers\Akash\.android\debug.keystore" | "C:\OpenSSL\bin\openssl" sha1 -b ...
+                                          ~~~~~~~~~~~~~~~~~~~~~~~~
Expressions are only allowed as the first element of a pipeline.
At line:1 char:122
+ ... kash\.android\debug.keystore" | "C:\OpenSSL\bin\openssl" sha1 -binary ...
+                                                              ~~~~
Unexpected token 'sha1' in expression or statement.
At line:1 char:137
+ ... :\OpenSSL\bin\openssl" sha1 -binary | "C:\OpenSSL\bin\openssl" base64
+                                           ~~~~~~~~~~~~~~~~~~~~~~~~
Expressions are only allowed as the first element of a pipeline.
At line:1 char:162
+ ... :\OpenSSL\bin\openssl" sha1 -binary | "C:\OpenSSL\bin\openssl" base64
+                                                                    ~~~~~~
Unexpected token 'base64' in expression or statement.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
Run Code Online (Sandbox Code Playgroud)

Muh*_*man 8

使用命令提示符。它会起作用。