Disable Share button in Facebook SDK 4.0 on Logout
-
I implemented the sample hello facebook and I m confused on some points. First when I test the app in real device from Android Studio, the post update button is already enabled (possibly) from facebook app which is already logged in When I login normally by pressing my app's facebook login button, profile picture and name shows up. BUT why when I logout the Share button is still enabled? private void updateUI() { boolean enableButtons = AccessToken.getCurrentAccessToken() != null; postStatusUpdateButton.setEnabled(enableButtons || canPresentShareDialog); Profile profile = Profile.getCurrentProfile(); if (enableButtons && profile != null) { profilePictureView.setProfileId(profile.getId()); greeting.setText(getString(R.string.hello_user, profile.getLastName())); } else { Shall I put here postStatusUpdateButton.setEnabled(false); profilePictureView.setProfileId(null); greeting.setText(null); } }
-
Answer:
The Share button does not require the user to be logged in (via your app) in order to share. It will either switch to the Facebook app or pop up a webview. In either case, they can log into Facebook without having to log in via your app. That's why it's never disabled, even if there's no access token.
user2629955 at Stack Overflow Visit the source
Related Q & A:
- How to upgrade Metaio SDk 6.0?Best solution by my.metaio.com
- How do I upgrade from Internet Explorer 4.0?Best solution by pcsupport.about.com
- Will the .net framework 4.0 be compatible with XP?Best solution by Yahoo! Answers
- How does one get a 4.0 GPA?Best solution by Yahoo! Answers
- How can I maintain a 4.0 high school GPA?Best solution by wikihow.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.