In my app I need to post certain content on user's timeline. I followed official tutorial given on https://developers.facebook.com/docs/howtos/androidsdk/3.0/publish-to-feed/. But in this tutorial, they've mentioned to set up Login flow first. And they have given a nice guide to do that. That's fine.
But the way I want is, user will be presented with Share Story button only. If user is logged in, story should be posted directly. And if not, normal login flow should be followed asking desired permissions and on login callback story should be published. I don't want to display Login button explicitly.
I stuck on this because in docs, everywhere they've mentioned to use <com.facebook.widget.LoginButton .... />
for login purpose. I don't want to use this at all as this will require user to interact two times. First tapping on Login button and second time to publish story he/she has to tap on Share Story button.
I can't find a way to check if user is not logged in and force him/her to login first from my code block.