Check if someone is logged onto Facebook using mobile - facebook

I am developing an app only for mobile users. How could I check if a user is logged into Facebook using a mobile phone?
NOTE: If user is not logged in via mobile phone then content of the app should not be displayed.

Here is a brief guide on how to implement SSO(Single-Sign-On) for mobile devices.

Related

Yammer login to web app not working on Iphone

Recently i registered app on yammer to use yammer for login to my web app. There is a problem on iOS with this flow, because when i try to login I get mobile yammer app login pop up & after that it only opens yammer app, and no redirection to my web app actually happens.
This only happens on iphone, on all other devices it works, on android also works with yammer app installed. Somebody familiar with this ?

How to skip the first facebook credential prompt?

I'm writing a hybrid app with Ionic and the workflow I imagine for a perfect facebook integration would be the following:
Scenario of a user logged in facebook with a native app:
Open my app
Touch login with facebook
Be prompted for facebook permissions and approve
Be directed to the desired screen of my hybrid app
Scenario of a user logged in facebook with his mobile browser:
Open my app
Touch login with facebook
Be prompted for facebook permissions and approve
Be directed to the desired screen of my hybrid app
Scenario of a user not logged in facebook (both in the native app and mobile browser):
Open my app
Touch login with facebook
Be prompted for facebook credentials
Be prompted for facebook permissions and approve
Be directed to the desired screen of my hybrid app
Is it possible to achieve as the mechanisms used to save session of a native app and a web app (facebook website) are way different?
How can I know if the native app is installed and once I know how can I use its session to prompt the user for permissions (as the android native apps do)?
Thanks in advance

iphone development: how to auto facebook login if the facebook app already logged in

In my app users can login by using facebook. I also have Facebook official app in my mobile phone and it is logged in. When I try to login from my app it asks for email and password. Is it possible to auto login if facebook app already logged in? How can I do that? because I know almost all apps use this feature
Have you considered Facebook SDK for iOS? Here is the link: https://developers.facebook.com/ios/

Native facebook app log in status in iOS

How to check if user is logged into the native facebook app or not in my another application in iPhone programmatically?
You can't check that. The Facebook SDK will allow user to login to your app. But it does not support any way to check if the user is logged in in the facebook app.

Facebook app - Mobile and Canvas?

can an app in Facebook have desktop page for Facebook Canvas and a page for Facebook mobile at the same time? Current I have a desktop app but if I create mobile pages on the same URL can I point the "Mobile Web" section of Facebook apps to that too?
Thanks
can an app in Facebook have desktop page for Facebook Canvas and a
page for Facebook mobile at the same time?
Yes, sort of. There is no mobile canvas, if that's what you mean. However, you can have a mobile web page and a desktop canvas app for the same app.
Current I have a desktop app but if I create mobile pages on the same
URL can I point the "Mobile Web" section of Facebook apps to that too?
Yes you can use the same URL for both, then just detect the user agent to determine which to show.
User agent sniffing is always a bad idea. In the entry point of your application you should determine if it's desktop or mobile by checking for the 'signed request' variable that Facebook sends if the user is loading the app via a page tab within Facebook (i.e. a desktop user). If the user is accessing the app on mobile, outside of Facebook, then this variable won't be sent.
php:
if(isset($_REQUEST['signed_request']))
//load desktop version
else
//load mobile version