如何为我的网站创建一个谷歌登录按钮 [英] how to create a google login button for my site

查看:95
本文介绍了如何为我的网站创建一个谷歌登录按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想用google account.how为我的网站创建一个登录按钮,以便将gmail数据恢复到我的网站。如果用户将使用gmail帐户登录我的网站。如果你知道将数据从gmail恢复到我的网站。



我们可以在.net2.0中开发该应用程序



如果您知道这些信息,请为我分享。











提前感谢。


i want create a login button for my site with google account.how to retrive the gmail data to my site.if user will login with gmail account to my site. if you know to retrive the data from gmail to my site.

we can develop the that application in .net2.0 or not

if you know the information please share for me.





thanks in advance.

推荐答案

是的你可以参考google API,你可以用它来做C#库或Javascript。



参考: http ://code.google.com/apis/accounts/docs/AuthForWebApps.html
Yes you can refer google API, you can either do it with C# libraries or Javascript.

Reference: http://code.google.com/apis/accounts/docs/AuthForWebApps.html


您可以在网站中试用此代码:

You can try this code in your WebSite :
<![CDATA[<%@ Page Language="VB" %>]]> 
 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head runat="server"> 
    <title></title> 
    <script type="text/javascript"> 
        function openForm() 
             { 
                  window.open("https://accounts.google.com/ServiceLogin?service=mail&passive=true&rm=false&continue=https://mail.google.com/mail/&ss=1&scc=1<mpl=default<mplcache=2&hl=en"); 
             } 
    </script> 
</head> 
<body> 
    <form id="form1" runat="server"> 
    <div> 
        <asp:button id="Button1" runat="server" text="Google Login" onclientclick="openForm();" xmlns:asp="#unknown" /> 
    </div> 
    </form> 
</body> 
</html>



我希望它会对你有所帮助。 :) --MKB


I hope it will help you. :) --MKB


您好,



您可以使用dotnetopenauth.dll登录google。我在这里找到了一个例子。



http://blogfornet.com/2013/11/how-to-login-with-google-in-your-site/



希望它会对你有所帮助。
Hi,

you can use dotnetopenauth.dll to login with google. i have found one example here.

http://blogfornet.com/2013/11/how-to-login-with-google-in-your-site/

Hope it will help you.


这篇关于如何为我的网站创建一个谷歌登录按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆