I would like to share that I wasn’t able to find on StackOverflow. I will be sharing what I have done so far and the respective output which I have never faced before.
What I have done:
- Followed the FB login implementation doc and added my LoginActivity for default deep link transactions from Facebook SDK.
- I created the debug key hash and getting unusual hash-key from the CLI like the image below. In the image you may see there,
=
is missing. - I am not able to use this key hash while implementing the login API of Facebook. It says the key-hash must end with an
=
character. Ref: in this image below.
And the same thing is happening with my release
hash key. So how can I get rid of this kind of problem?
2
Answers
if you have ssl executor then try this
Alternative:
Step 1
go to http://tomeko.net/online_tools/hex_to_base64.php
Step 2
paste the SHA-1 in the first field
Step 3
copy the text in input field under "Output (base64)"
Step 4
now open developer.facebook.com/apps
click your app
on the left side navigate to "Settings" -> "Basic"
past the Base64 text here under key hashes
Here is the fastest way to get SHA-1 key. Please follow below steps.
Example
Select app module from module selection dropdown to run or debug your application
And then call following function in onCreate of your activity
or
In App following code to generate hash key. And then run your app you can check you hash key in logcat.