oAuth 与 PHP(用于 google api)

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2084087/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-25 04:56:48  来源:igfitidea点击:

oAuth with PHP (for google api)

phpoauth

提问by saturngod

How to use oAuth with PHP ? I can't install oauth class with pecl because I'm using share hosting.

如何在 PHP 中使用 oAuth?我无法使用 pecl 安装 oauth 类,因为我使用的是共享托管。

I found

我发现

http://code.google.com/p/oauth-php/

http://code.google.com/p/oauth-php/

but there is no example for client. I want to use oauth for Google API.

但没有客户的例子。我想对 Google API 使用 oauth。

采纳答案by saturngod

I got it and I develop my own client library base on http://googlecodesamples.com/oauth_playground/(svn sourcecode)

我得到了它,我发展我自己的客户端库基地http://googlecodesamples.com/oauth_playground/SVN源代码

回答by James Hartig

Here is your example: http://code.google.com/p/oauth-php/wiki/ConsumerHowTo

这是您的示例:http: //code.google.com/p/oauth-php/wiki/ConsumerHowTo

You can also read through http://code.google.com/apis/gdata/docs/auth/oauth.htmlto find out the specifics on Google.

您还可以通读http://code.google.com/apis/gdata/docs/auth/oauth.html以了解有关 Google 的详细信息。

回答by Daan

I guess you mean this offical library:

我猜你是说这个官方图书馆:

Offical API Library

官方API库

回答by Paul Osman

There are plenty of libraries available for PHP. Check out the list on http://oauth.net/code/

PHP 有很多可用的库。查看http://oauth.net/code/上的列表