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
oAuth with PHP (for google api)
提问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 Dhruv Baldawa
You should probably have a look at: http://www.dhruvb.com/blog/content/tutorial-using-oauth-google-plus-api
您可能应该看看:http: //www.dhruvb.com/blog/content/tutorial-using-oauth-google-plus-api
Also, the code samples are present at: https://github.com/dhruvbaldawa/Tutorials/blob/master/google+/google_plus.php
此外,代码示例位于:https: //github.com/dhruvbaldawa/Tutorials/blob/master/google+/google_plus.php
回答by Daan
回答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/上的列表

