views:

104

answers:

3

I want to implement facebook login using php. the php page should automatically login to facebook using a user name and password specified. is it possible? which platform should i use. the script should not aske for username and password. just log in using a username and password probably stored in a mysql database or php variable.

A: 

It's not possible I'm afraid, you have to use Facebook Connect.

Here's the latest OAuth2.0 info: http://developers.facebook.com/docs/guides/web

Bit of a read, but should help.

diggersworld
A: 

You can't do that. What you are supposed to do is request permission from the user to access their information when they are not online. Then Facebook will allow you to query information about the user. Facebook will control what you have access to.

An alternative is to get a permanent session key, which is what "desktop" applications use for access Facebook. That sort of works like an automatic login.

Brent Baisley
A: 

If you are lazy you can use JanRain / former RPX Now:

http://www.janrain.com/products/engage/get-janrain-engage

The API is a bit simpler than direct facebook access. Also you could support users of other platforms (Twitter, OpenID in general).

But there are drawbacks of course, like making yourself depended on an additional party.

Alex