开发者

implement facebook login

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.


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.


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜