我正在尝试在我的应用程序中使用共享按钮,但它看起来好像被禁用了:
我已经初始化了sdk:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
FacebookSdk.sdkInitialize(getApplicationContext());
}
我还按照文档建议正确配置了清单: https ://developers.facebook.com/docs/android/getting-started
视图中的按钮是这样的:
<com.facebook.share.widget.ShareButton
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/share"
android:id="@+id/share_on_fb_button"
bind:onClick="shareOnFBButtonClick"/>
可能是什么问题呢?为什么按钮被禁用?我应该在我的应用程序中实现登录功能吗?或者我只需要在设备上安装 facebook 应用程序?