Facebook share button for Android not enabled, stays faded -
i trying add facebook share in android. have added button in xml this
<com.facebook.share.widget.sharebutton android:id="@+id/ivshare" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:layout_margintop="5dp" />
in java have tried implement this
@onclick(r.id.ivshare) public void onshareclick() { sharelinkcontent linkcontent = new sharelinkcontent.builder() .setcontenttitle("hello there") .setcontentdescription( "the 'hello facebook' sample showcases simple facebook integration") .setcontenturl(uri.parse("market://details?id=" + getpackagename())) .build(); sharebutton.setsharecontent(linkcontent); sharebutton.registercallback(callbackmanager, new facebookcallback<sharer.result>() { @override public void onsuccess(sharer.result result) { timber.d("share result %s", result); } @override public void oncancel() { } @override public void onerror(facebookexception error) { error.printstacktrace(); } }); }
but thing faded, unclickable share button. have made app on developers.facebook.com, added release key hash , made app live there.
Comments
Post a Comment