我想显示来自我的 GA 帐户的 Google Analytics 数据,并使其可供任何未经身份验证的用户使用。我已经完成了 OAuth2 访问,但我每次都必须登录我的谷歌帐户。有什么办法可以设置自动认证?我的意思是每个打开页面的用户都从我的谷歌分析页面获取数据。我需要类似 GAPI 类的东西。谢谢你的回复。
问问题
145 次
1 回答
0
Questions:
1.What have you tried?
2.Whats the point of showing your analytics details to all the users?
You can try the following:
You have to store your oauth token in db or in some files.
When you are loading the page , you have to check in the backend its a valid token , or expired token. If its expired you can exchange the token with the valid oauth token .
Once you got the valid token you can call the api on the fly and display the Google Analytics data to user.
于 2013-02-08T12:36:31.460 回答