Is it possible to get facebook login status using Graph API? - facebook

I have a page with Facebook connect button. After the user clics on the button and grants the required permission, I need to check the login status.
Is it possible to do that without using javascript ? probably using the Graph API.
I'm using APEX and the page contents will depend on whether the user is connected to my app or not.
For info the user is asked to connect to my app using login page :
https://www.facebook.com/v2.10/dialog/oauth?client_id=xxx&redirect_uri=www.example.com&scope=public_profile,email,user_friends
Thanks for your help.

There is, but using the Javascript SDK is encouraged for web applications. See Facebook's documentation for implementing login on other platforms, specifically when dealing with browsers that don't support Javascript.

Related

Using facebook login authentication to access the website

In stead of website build-in login form, I use Facebook login to get user authentication, then they can browse all other page on my website.
My question is how to store user permission so that in all page, my website recognize that the current user is a authenticated user?
Is there any function in Facebook SDK provided these feature or I should use basic PHP function?
Thanks
The SDK itself doesnt offer you such a method to store the data. You have to do this by your own. There is own programmed component that can manage such for you. It stores the access_token for the users in a database. This can directly done via ajax. You can request for users permissions and store the data in the database...in one step!
Have a look at http://www.facebook.com/pages/Helper-Component-Community/222933037808340?sk=app_412923142052609

connecting to Facebook via custom UI through using the xauth

I am working on a mac application which involves Facebook support so that they can share to Facebook via our app.
For this, I am using Facebook Graph API's which internally uses oAuth protocol to access user resources. In this process, it uses webview to enter users credentials(username and password) which provides the "Access_token".
But my requirement of the application is that it should not use webview to enter user credentials rather it should use other view controller to provide user credentials. So I need to go for xAuth protocol as in twitter uses.
Can anyone help me in this issue? If facebook supports xAuth, please make suggestions.
Facebook doesn't offer "desktop" application authentication support as detailed here: https://developers.facebook.com/docs/authentication/
What you would have to do, is get them to authorize your app on a website, then use the access token for the desktop app and that is if your app is connected to some kind of server.
Otherwise you will have to follow their suggestion of embedding a browser and reading the access token once it is received.

Graph API save login information

I am using the Graph API for Facebook on my iPhone application. The problem is, I don't want the user to have to re enter their email address each time they want to login to integrate Facebook with my app. Is there a way to save and auto fill the login information using the Graph API?
Using the Graph API, there is no need for you to store the credentials, more than that, you should NOT store the credentials. As explained in the API dedicated help page the authentication process is handled by a secure token.
Meaning that if the user is already authenticated on Facebook using another application, it might be ( based on authentication process used ) already authenticated within your app.
You might check the token validity by using the isSessionValid method from the Facebook class.
Have a look to the iOS Facebook SSO link, it explains everything you need.

Custom login form to Facebook on an iPhone app

I'm trying to make an application that can connecto to facebook. I've found Facebook Connect for iPhone and I don't like the login form that it has.
Is there any way to make a custom login form? Is there some api functions to call to login an user on Facebook?
Thank you.
I would recommend not going this route. I'd be suspicious of any app that's asking for credentials that's not using the de-facto standard login control. If there is no standard control, then I have to take my chances with whatever the app presents, but in the case of Facebook, the standard control is part of Facebook Connect.
Just use one of the other API's such as the REST API and then create your own UI to capture the login credentials and call the REST API to login.

Facebook remember me

I want to implement a "remember me" feature on me website using the facebook connect.
On my website, i have the possibility to do the login by two distinct ways:
Normal login
Facebook Connect
When an user performs the login with facebook connect, even if he logs out on his facebook account, i want to keep him logged in on my website. He will only log out if he clicks on the logout button on the website.
Is there a way to do this?
Thanks in advance
Here is a tutorial using PHP that demostrates how to use Facebook connect. If you read the section about the login page, you'll see that Facebook does some funky javascripting that creates session cookies on your domain based on the login status on Facebook. You might be able to manipulate the API to give yourself the persistance that you're looking for.
Good luck, and hope this helps some in your project.