Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android facebook sdk publish feed to user's timeline

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.

like image 947
Gimali Avatar asked Feb 28 '13 20:02

Gimali


1 Answers

It might be a bit late, but this appears to answer your question:

Android - Facebook SDK 3 - How to login programmatically without LoginButton

like image 152
IanB Avatar answered Sep 23 '22 17:09

IanB