Android - Facebook KeyHash 設定
转自:http://www.dotblogs.com.tw/newmonkey48/archive/2014/04/17/144779.aspx
App要使用Facebook 分享時,設要在Facebook應用程式裡設定app 的key hash
但keyhash要怎麼取得呢?
可參考兩個網址
http://blog.changyy.org/2011/05/android-facebook-sdk.html
http://blog.rx836.tw/blog/android-facebook-key-hashes/
需下載 openssl
http://blog.rx836.tw/blog/android-facebook-key-hashes/
下載後,解壓縮,如下,到bin資料下底下取得openssl.exe
C:\Users\Tom\Downloads\openssl-0.9.8h-1-bin\bin
放至Java目錄下,如下
C:\Program Files\Java\jdk1.6.0_23\bin
並從eclipse取得keystore放置位置
[Windpw] -> [Preferences] -> [Android] -> [Build] 的 Default debug keystore
我這邊取得的是
C:\Users\Tom\.android\debug.keystore
再來是使用Java bin底下的keytool,取得keyhash
打如下的指令
keytool -exportcert -alias androiddebugkey -keystore C:\Users\Tom\.android\debug.keystore | openssl sha1 -binary | openssl base64
會顯示以下,並輸入預設密碼android
輸入keystore 密碼:android
就會取得keyhash
再到facebook ->管理應用程式 ->自己的應用程式-> 設定 ,key hash 填入該keyhash即可。
debug.keystore的預設資料如下
Keystore name: "debug.keystore"
Keystore password: "android"
Key alias: "androiddebugkey"
Key password: "android"
CN: "CN=Android Debug,O=Android,C=US"
注意:
打不到的alias及密碼,都會影響keyhash的產生結果,必須與當時的alias及密碼相同。
// mac平台
- First open a terminal (open a command prompt in windows).
- Navigate in the terminal to the directory where your Android debug.keystore is stored.
- Mostly it will located under “/Users/user_name/.android/” (In Windows will be C:\Documents and Settings\.android).
Once you are in the “.android” directory, run the following command.
keytool -exportcert -alias androiddebugkey -keystore debug.keystore | openssl sha1 -binary | openssl base64
When it prompts you for a password, type android and hit Enter
Copy the value printed in the terminal that ends with an “=” and paste it in the Key Hash field in Facebook. Then click the Save Changes button.
Android - Facebook KeyHash 設定的更多相关文章
- Delphi APP 開發入門(二)Android/iOS設定,Hello World
Delphi APP 開發入門(二)Android/iOS設定,Hello World 分享: Share on facebookShare on twitterShare on google_plu ...
- SDK接入(1)之Android Facebook SDK接入
SDK接入(1)之Android Facebook SDK接入 由于游戏已上线,且处于维护阶段,所以有空写写各种SDK接入过程和遇到的问题,也当作一种工作总结.SDK接入主流分为这么几类,登录.支付. ...
- 修正 Memo 設定為 ReadOnly 後, 無法有複製的功能
问题:当 Memo 設定為 ReadOnly = True 後, 选取一段文字后,無法有複製的功能. 适用:XE6 Android 系统(目前 iOS 还找不到方法) 修正方法: 请将源码 FMX.P ...
- 擠出線寬(Extrusion width),要怎麼設定?
擠出線寬(Extrusion width),要怎麼設定? Slic3r的作者,把這邊的%設定,跟"層高"做連結.我個人認為擠出線寬,要以噴頭孔徑當做設定參考才好.層高應該只要設定成 ...
- 免安裝、免設定的 Hadoop 開發環境 - cloudera 的 QuickStart VM
cloudera 的 QuickStart VM,為一種免安裝.免設定 Linux 及 Hadoop,已幫你建好 CDH 5.x.Hadoop.Eclipse 的一個虛擬機環境.下載後解壓縮,可直接以 ...
- 【转】bind - DNS 設定
http://www.l-penguin.idv.tw/article/dns.htm 參考資訊 DNS 是所有伺服之母,電腦連節時均以 IP 為主,比方說輸入 202.43.195.52 就會到台灣 ...
- JavaFX結合 JDBC, Servlet, Swing, Google Map及動態產生比例圖 (3):部署設定及應用 (转帖)
說明:這一篇主要是說明如何將程式部署到Application Server,以及程式如何運作,產生的檔案置於何處,以及如何以瀏覽器呈現(Applet),或是當成桌面應用程式,或是 桌面Applet,這 ...
- ASP.NET MVC3 在_ViewStart設定Layout後用RenderAction的注意事項
ASP.NET MVC3 在_ViewStart設定Layout後用RenderAction的注意事項 3/24 TW MVC第一次活動圓滿的結束了,雖然是RC,但也來了不少願意聽我們分享的好朋友. ...
- 【转】什麼是 Team Explorer Everywhere 2010 ?TFS 專用的 Eclipse 整合套件的安裝與設定
前言- 大家都知道 版本管控是一件很重要的事情!而且也知道分別有 VSS , SVN , TFS 等- 多數人都會覺得, .NET 的開發工具要用 VSS . TFS .SVN 而 Java 的 Ec ...
随机推荐
- 你能识别这些科技公司的真假logo吗?
快告诉我,不止我一个眼瞎~
- 响应式设计中几个class区别
table-responsive:在小屏幕时不对内容做任何额外排版,只是允许左右滑动 scrollable-area:先尝试挤压起来,实在不行再左右滑动
- jQuery Mobile中文手册:开发入门
jQuery Mobile 以“Write Less, Do More”作为目标,为所有的主流移动操作系统平台提供了高度统一的 UI 框架:jQuery 的移动框架可以让你为所有流行的移动平台设计一个 ...
- 预热buffer pool
mysqldump -u root db_name table_name> /dev/null select * from ...
- SPF详解2
什么是SPF? 这里的SPF不是防晒指数,而是指Sender Policy Framework.翻译过来就是发信者策略架构,比较拗口,通常都直接称为SPF. SPF是跟DNS相关的一项技术,它 ...
- 打造万能的ListView GridView 适配器
转载:http://blog.csdn.net/lmj623565791/article/details/38902805/ 通用的ViewHolder 首先分析下ViewHolder的作用,通过co ...
- Android 获取assets的绝对路径
第一种方法: String path = "file:///android_asset/文件名"; 第二种方法: InputStream abpath = get ...
- Selenium2Library系列 keywords 之 _SelectElementKeywords 之 unselect_from_list_by_label(self, locator, *labels)
def unselect_from_list_by_label(self, locator, *labels): """Unselects `*labels` from ...
- Solaris系统管理(二)资源管理与网络配置
上一篇主要总结了Solaris安装后需要进行的一些设置,如ssh,pkgutil管理依赖,vim安装. 这一篇将会对Solaris资源管理与网络配置进行总结. 四 Solaris 系统管理 1,查询总 ...
- 【LeetCode】100 - Same Tree
Given two binary trees, write a function to check if they are equal or not. Two binary trees are con ...