I'm trying to implement "share with facebook" functionality in my app but WebDialog crashes if session is not opened. Is there any built in possibility to request user login if session is not opened and show share dialog otherwise ?
Asked
Active
Viewed 116 times
0
-
You can use the following link to share on wall http://stackoverflow.com/questions/16729661/facebook-sdk-3-0-1-is-not-working-properly/16734283#16734283 – Abhishek Agarwal Feb 28 '14 at 11:30
1 Answers
1
try this:
private void onFacebookClick2() {
if (mFacebook.isSessionValid()) {
SessionStore.restore(mFacebook, this);
postToFacebook("Your text");
} else {
mFacebook.authorize(this, PERMISSIONS, -1,
new FbLoginDialogListener());
}
}
or try this tutorial
http://www.androidhive.info/2012/03/android-facebook-connect-tutorial/