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 ...
随机推荐
- android部分手机onclick事件触发2次
var t1 = null; function btnSave() { if (t1 == null) { t1 = new Date().getTime(); } else { var t2 = n ...
- aspose.word 查找文本并加下划线
private Run SplitRun(Run run, int position) { Run beforeRun = (Run)run.Clone(true); beforeRun.Text = ...
- effective java 笔记1--序言
一.序言 程序设计的几条基本原则: 1.清晰性和简洁性最为重要,模块的用户永远也不应该被模块的行为所迷惑,所以写良好的注释是必需的. 2.模块要竟可能小,但也不能太小,好一个深奥的哲学问题. 3.代码 ...
- [搜片神器]之DHT网络爬虫的C++程序初步开源
回应大家的要求,特地整理了一开始自己整合的代码,这样最简单,最直接的可以分析流程,至于文章里面提供的程序界面更多,需要大家自己开发. 谢谢园子朋友的支持,已经找到个VPS进行测试,国外的服务器: ht ...
- Golang 绘图基础 -绘制简单图形
前一节讲的是 绘图到不同输出源,请看地址: http://www.cnblogs.com/ghj1976/p/3440856.html 上一节的例子效果是通过设置每一个点的的RGBA属性来实现的,这是 ...
- Pitcher Rotation
题意: n个人m个对手给出每个人能战胜每个敌人的概率,现在有g个比赛,每个人赛完后要休息4天(可重复用),求能获得胜利的最大期望个数. 分析: 因为只有每个人5天就能用一次,所以对于每个人来说,只有得 ...
- CMDB反思4
CMDB模型设计2 http://blog.vsharing.com/xqscool/A1275233.html 估计大家看到破子的这两篇都有点晕哈,我也有点晕. 两篇对比来看. 第1处,属性部分 ...
- enum 使用
1.说明 enum是一个基本的关键字,却一直没弄清楚怎么用,这次在实现二叉树框架时需要用到常量,特地搜了一下,终于知道怎么用了. 2.enum使用要点 enum声明是一个类型,不是变量. enum经常 ...
- geeksforgeeks@ Find sum of different corresponding bits for all pairs (Bit manipulation)
http://www.practice.geeksforgeeks.org/problem-page.php?pid=387 Find sum of different corresponding b ...
- 触控发布《Cocos开发者平台白皮书》
Cocos 2014 开发者大会(秋季)组委会今天正式发布了<Cocos开发者平台白皮书>,GameRes游资网得到Cocos官方授权发布该白皮书电子版. 白皮书主要内容包括对行业的趋势解 ...