android - Facebook LoginButton doesn't work, just show a spinning screen -


i'm following facebook instruction , use own loginbutton, ran 2 issues (they happened randomly between two) :

  • it said invalid hash key, although i've added key fb app or

  • there's spinner, nothing else happened. in case, checked onactivityresult function, got following: requestcode = 129742 resultcode = -1

also in both cases, in following function of facebookbuttonbase, externalonclicklistener null

protected void callexternalonclicklistener(final view v) {         if (externalonclicklistener != null) {             externalonclicklistener.onclick(v);         }     } 

what missing? thanks

update: way obtained key hash using provided piece of code , copy value out, paste onto fb.

@override  public void oncreate(bundle savedinstancestate) {      super.oncreate(savedinstancestate);       try {          packageinfo info = getpackagemanager().getpackageinfo(                            "com.facebook.samples.loginhowto",                              packagemanager.get_signatures);          (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) {            }             ... 

did add androidmanifest ?

<activity         android:name="com.facebook.facebookactivity"         android:configchanges="keyboard|keyboardhidden|screenlayout|screensize|orientation"         android:label="@string/app_name"         android:theme="@android:style/theme.translucent.notitlebar" /> 

Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -