公司需要做FB插件,故研究了一下,下面是总结:
1.在https://developers.facebook.com/android/ 下载sdk 3.0
2.可以按照https://developers.facebook.com/docs/getting-started/facebook-sdk-for-android/3.0/ 开始做 前几部估计是android开发者都会,那么跳到第四步
有个问题是
keytool -exportcert -alias androiddebugkey -keystore %HOMEPATH%\.android\debug.keystore | openssl sha1 -binary | openssl base64
获取hash的时候 发现找不到openssl命令 那就去http://www.onlinedown.net/soft/85287.htm下载了一个包 也不行添加到bin中了 于是直接解压放到了 c盘目录

这样执行就得到了hash了
然后创建一个应用按照start的说明填写了一下

然后把他的sdk和simples导入到eclipse中 更改了一下错误的android lib
就可以运行了
simple的appid在 string.xml中配置成自己的就可以了
<resources>
<string name="app_name">HelloFacebookSample</string>
<string name="cancelled">Cancelled</string>
<string name="permission_not_granted">Unable to perform selected action because permissions were not granted.</string>
<string name="ok">OK</string>
<string name="hello_user">Hello %1$s!</string>
<string name="success">Success</string>
<string name="successfully_posted_post">Successfully posted \'%1$s\'.\nPost ID: %2$s</string>
<string name="error">Error</string>
<string name="status_update">Updating status for %1$s at %2$s</string>
<string name="photo_post">Photo Post</string>
<string name="you_picked">You picked:</string>
<string name="no_friends_selected"><No friends selected></string>
<string name="no_place_selected"><No place selected></string>
<string name="pick_seattle_place">Pick a Seattle Place</string>
<string name="app_id">574439445908505</string>
</resources>
结果

1399

被折叠的 条评论
为什么被折叠?



