php cURL的替代品- OpenId和谷歌,Facebook api服务器端身份验证

Alternatives for php cURL - OpenId and Google, Facebook apis server side authentication

本文关键字:Facebook api 服务器端 身份验证 谷歌 cURL 替代品 OpenId php      更新时间:2023-09-26

看起来像大多数openid, facebook, google认证api和方法使用PHP cURL对外部网站进行认证。我的主机服务没有为我提供cURL,所以我必须从客户端java脚本进行身份验证。但它可能并不安全。所以谁能提供开源的php实现来验证和使用来自google, facebook, linkedin, twitter等的用户数据呢?

你也可以让我知道我在哪里可以找到javascript/php(不需要curl/wrapper)认证和用户数据访问示例脚本(如获取用户墙帖子,用户内容,朋友列表,更新流等)。

注意:我已经看到外部实体为各种开放id认证提供服务,但我想自己做一组自定义每个(facebook, google, linkedin)。

LinkedIn开发人员网站在php中使用php pecl oauth扩展检索信息的示例如下:php https://developer.linkedin.com/documents/quick-start-guide toggleview: id =

本指南也适用于twitter,并对Facebook进行了一些修改。

请注意,如果你决定走这条路,LinkedIn也有一个JavaScript API,它为你抽象了安全。

file_get_contents我推荐如果你的主机允许的话http://php.net/manual/en/function.file-get-contents.php

另外还有file_put_contents用于发帖http://www.php.net/manual/en/function.file-put-contents.php

可能需要您的主机进行一些修改根据经验如果cURL被禁用这些也是