Opensocial pageViewer/pageOwner 概念如何运作?
我的问题可能很简单,但我只是不知道 pageViewer/pageOwner 概念如何工作,或者最好说我不知道如何摆脱这个系统。 我只想制作一个小工具,它可以处理 Twitter、Google+ 等网络的所有 Oauth 身份验证。
所以基本上我想让用户说出他想要访问多少个网络,然后我进行所有Oauth-authentifications
,我使用Liferay
和Opensocial
为此任务但出现此错误:
OAuth error: UNKNOWN_PROBLEM: Client state belongs to a different person (state owner=G-10180, pageViewer=10196) ==== Original request: GET /m8/feeds/contacts/default/base?alt=json Host: www.google.com X-Shindig-AuthType: oauth X-Forwarded-For: 87.139.78.177 X-shindig-dos: on ====
我想我必须更改 shindig.properties
文件中的某些内容,但这就是我需要您帮助的地方。
- - - - - - - - - - - - - - - -更新 - - - - - - - - - ---------------- 我知道我的身份验证的第一部分有效,因为我获得了身份验证令牌,但它是无效的。我假设该小工具需要一个与所有者存储的令牌相同的令牌。
如果您有一个小代码示例供我将观看者识别为新用户(如果他还不是会员),那就太完美了。请告诉我必须将此代码放在我的小工具中的哪里,因为到目前为止 opensocial 的文档花费了很多生命,但我找不到这个问题的答案:)。
提前致谢
My Problem might be simple, but i just dont know how the pageViewer/pageOwner
concept work or its better to say i dont know how i can get rid of this system.
I just want to make a Gadget, which handles all Oauth-authentifications
for Networks like Twitter, Google+ etc.
So basicly i want to let the User say how many Networks he wants to access and then i make all Oauth-authentifications
, i use Liferay
and Opensocial
for that task but get this error:
OAuth error: UNKNOWN_PROBLEM: Client state belongs to a different person (state owner=G-10180, pageViewer=10196) ==== Original request: GET /m8/feeds/contacts/default/base?alt=json Host: www.google.com X-Shindig-AuthType: oauth X-Forwarded-For: 87.139.78.177 X-shindig-dos: on ====
I guess i have to change something in the shindig.properties
file, but this is where i need your help.
-------------------------------UPDATE----------------------------------
I know that the first part of my Authentication works because i get a authentication token, but it is invalid. I assume that the gadget expects a token identical to the token the owner stored.
It would be perfect if you have a little code example for me to identify the viewer as new user if he isnt already a member. Please tell me where i have to put this code in my gadget because the documentation of opensocial costed much lifetime til now, but i cant find an answere to this issue :).
Thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请参阅我对您的其他问题的回复:链接
您基本上遇到了同样的问题,即查看者不是页面所有者。正如我在您的其他问题中提到的,页面查看者必须是 OAuth 小工具的页面所有者(换句话说,您必须将 OAuth 小工具添加到您拥有的页面)。
我希望 Shindig 的未来版本将完全支持将 OAuth 小工具添加到查看者 != 所有者的页面,但我很难从 Shindig 社区获取反馈(请参阅 此处)
Please see my response to your other question: link
You're basically encountering the same problem where the viewer is not the page owner. As I mentioned in your other question, the page viewer must be the page owner for OAuth gadgets (in other words, you must add the OAuth gadget to a page you own).
I'm hoping that a future version of Shindig will fully support adding OAuth gadgets to pages where the viewer != owner, but I'm having difficulty getting feedback from the Shindig community (see here)