Showing posts with label social. Show all posts
Showing posts with label social. Show all posts

Monday, May 05, 2014

Bad Key Hash for Facebook Apps


When you are creating application for Facebook on Android platform, Developer Website requires the Key Hash for every development device.

This secret stroke is automatically generated by Eclipse or other dev studio in "debug.keystore" storage.

You can obtain Key Hash via command line:

keytool -exportcert -alias androiddebugkey -keystore debug.keystore | openssl sha1 -binary | openssl base64

or sample code:

...
   @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        // Temporary code to print out the key hash
        try {
            PackageInfo info = getPackageManager().getPackageInfo(
                    "com.Your.Application.Package.Name", PackageManager.GET_SIGNATURES);
            for (Signature signature : info.signatures) {
                MessageDigest md = MessageDigest.getInstance("SHA");
                md.update(signature.toByteArray());
                Log.d("KeyHash:", Base64.encodeToString(md.digest(), Base64.DEFAULT));
            }
        } catch (NameNotFoundException e) {
        } catch (NoSuchAlgorithmException e) {
        }
...

You have to add all you developer and release key hashes into Web panel of your Facebook Application. Everything looks simply enough.

But, if your hash key contains / (slash) or + (plus) symbol Facebook integration will not work! You'll get error message, something like that: "Key hash Fj2DQ/kUxqHuaTq1jy9iTejN2Uk= does not match any stored key hashes".

I've spent few hours to understand the problem and find a workaround :( Here is an easiest way:

  1. Delete "debug.keystore" file in your "[%USERNAME%]/.android" folder.
  2. Rebuild project to get new "debug.keystore" file with new key hash.
  3. If new hash contains any symbol (= at the end is OK :)) repeat again

Hope this tip helps other developers! Sometimes, development for Android and Facebook is a pain...


Friday, November 15, 2013

How do I make software products?

Here is a screencast on x8 speed of all processes are required to create the software product and to publish it online:


As you see coding takes less than half of time. Making of screenshots is more important than programming. Pages in social networks are more important than pretty looking website. And so on...

Program in this video is a first public version of Missing Buttons software

Friday, November 02, 2012

Software product in less than 1 hour!

There were about 3 hours of free time before visit to the cinema. So, just for fun, I've decided to measure the speed of my work. Also I was planning to record a screencast movie "how to make software products" :)

Unfortunately CamStudio recorder sucks for high resolution screen, so there is no movie :( But in less than 1 hour I've finished following tasks:

  • Purchase domain for new site and setup Wordpress there
  • Create Facebook, Twitter and Google+ accounts for new software
  • Make a copy of Caps Lock Indicator software for Scroll Lock key
  • Setup trial protection routines
  • Build installation package and upload it to the website

Not bad, isn't it? ;)

So, here it is: Scroll Lock Indicator software for Windows.

Scroll Lock Indicator software for Windows
Download EXE file
Download ZIP Archive

Software offers two Scroll Lock state indicators: Tray Icon and On-Screen Display. Notifications by different sound when On and Off are also available.

The product is distributed as try before you buy (shareware) with 30-day trial period. The license costs $2.95 per user.

Sunday, August 05, 2012

IFTTT Challenge

Testing IFTTT service.

Notification about this post should appear in @karpolan twitter