Trying to publish photo in facebook with facebook sdk
SharePhoto photo = new SharePhoto.Builder()
.setBitmap(bmp)
.build();
SharePhotoContent content = new SharePhotoContent.Builder()
.addPhoto(photo)
.build();
ShareDialog shareDialog = new ShareDialog(getActivity());
shareDialog.show(content, ShareDialog.Mode.AUTOMATIC);
shareDialog.registerCallback(((MainActivity) getActivity()).callbackManager, new FacebookCallback<Sharer.Result>() {
@Override
public void onSuccess(Sharer.Result result) {
if (isVisible()) {
pbLoading.setVisibility(View.VISIBLE);
}
}
@Override
public void onCancel() {
}
@Override
public void onError(FacebookException error) {
Toast.makeText(getActivity(), "FB Error", Toast.LENGTH_LONG).show();
}
});
But got FacebookEcxeption
{FacebookGraphResponseException: (#200) Requires extended permission: publish_actions httpResponseCode: 403, facebookErrorCode: 200, facebookErrorType: OAuthException, message: (#200) Requires extended permission: publish_actions}
Last version of facebook app installed on device. According to user manual no need to receive special permission if you use a ShareDialog.
Also tried to use ShareApi.share() but with the same result. What I did wrong?