i have a share button inside eache item of an @listview Application starts well, but it crashes when I press Facebook sharebutton button.
holder.button = (ShareButton) v.findViewById(R.id.btnOne);
holder.button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick( View v) {
v.setTag(holder);
Drawable mDrawable = holder.imageview.getDrawable();
Bitmap image = ((BitmapDrawable)mDrawable).getBitmap();
SharePhoto photo = new SharePhoto.Builder().setBitmap(image)
.build();
SharePhotoContent content = new SharePhotoContent
.Builder().addPhoto(photo).build();
ShareApi.share(content, null);
}
});
and thhis is the logCat logCat
Manifest
<meta-data android:name="com.facebook.sdk.ApplicationName"android:value="@string/app_name" />
<provider android:authorities="com.facebook.app.FacebookContentProvider(app id )"
android:name="com.facebook.FacebookContentProvider"
android:exported="true" />
<activity
android:name=".MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>