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 ...
随机推荐
- Java正确转换html编码
Java 中能將 html 編碼正確轉換的套件: org.apache.commons.lang.StringEscapeUtils. String source = "The less t ...
- 题目1003:A+B ---c_str(),atoi()函数的使用;remove , erase函数的使用
#include<stdio.h> #include<stdlib.h> int sw(char *a){ ,c=; while(a[i]){ ') c=c*+a[i]-'; ...
- 字符串中符号的替换---replace的用法
#include<iostream> #include<string> using namespace std; int main() { string s1 = " ...
- 把raw目录下的几张照片存放到SD卡里面去
try { //SD卡路径 String filename =android.os.Environment .getExternalStorageDirectory().getAbsolutePath ...
- go 应用程序性能测试
runtime/pprof 我们要加入对pprof包里的方法调用,程序才能将运行时候程序的堆内存分配状态记录到文件(也可以是写到其他地方,例如网络等)中,以便进一步的分析. 如果你的go程序只是一个应 ...
- jquery禁用右键单击功能屏蔽F5刷新
1.禁用右键单击功能$(document).ready(function() { $(document).bind("contextmenu",function(e) { aler ...
- AngularJs学习教程
AngularJs 目录 AngularJs实战一 购物车 细讲ng-repeat指令 ng-show和ng-hide ng-class指令 ng-src和ng-href 应用控制器中的职责 watc ...
- 【LeetCode】107 - Binary Tree Level Order Traversal II
Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left ...
- F#相关图书推荐
C#与F#编程实践 作 者 [捷] Tomas Petricek,[英] Jon Skeet 著:贾洪峰 译 出 版 社 清华大学出版社 出版时间 2011-10-01 版 次 1 ...
- 最好的10本适用于初学者阅读的javaScript和jQuery书籍
现在有许多方式学习新的内容,但是对于刚开始学习和寻找真正沉迷其中的平和状态的人而言,经典的纸质书籍依旧是首选.我发现阅读一本纸质书籍会让自己远离那些在使用电脑和平板时出现的令人不安的情绪.电子书和播客 ...