Hi I have problem with Facebook:
Case:
1.User has no Facebook app.
2.User logins into Facebook via WebDialog
3.User gives all permissions for share, and shares post
4.User enters Facebook account, than into applications, and removes my app.
5.User tries to make share again.
6."Unknown error. Please try again later" Appears in WebDialog.
Is there a way to fix this case? I found that using ShareDialog i can avoid this problem when user has facebook app installed, but I don't know how to solve it if user has no fb app on his phone.
To show dialog I verify:
private boolean checkFacebookLogin(){
Session session = Session.getActiveSession();
if(session!=null && session.isOpened() ){
return true;
}
return false;
}
Than i ask for permissions if they are needed:
private void performPublish() {
Session session = Session.getActiveSession();
pendingAction = PendingAction.POST_STATUS_UPDATE;
if (session != null && mCurrentActivity!=null) {
if (hasPublishPermission()) {
// We can do the action right away.
handlePendingAction();
} else {
// We need to get new permissions, then complete the action when we get called back.
session.requestNewPublishPermissions(new Session.NewPermissionsRequest(mCurrentActivity, PERMISSIONS));
}
}
}
In the end i show WebDialog:
WebDialog feedDialog = (
new WebDialog.FeedDialogBuilder(mCurrentActivity,
Session.getActiveSession(),
postParams))
.setOnCompleteListener(new OnCompleteListener() {
@Override
public void onComplete(Bundle values,
FacebookException error) {
}
})
.build();
feedDialog.show();
After showing WebDialog, it redirects to error page with "Unknow error [...]" text, i have found no error information, so I don't even know that something goes wrong.
I tried HelloFacebookSample, but there if user has no facebook app, he can't edit post in facebook dialog. I want to see Facebook dialog in both cases ( with/without fb app installed).