简体   繁体   English

导入登录的用户Disqus注释

[英]Import logged in user disqus comments

I have set up an openid logging in system for mysite and the famous disqus commenting system . 我已经为mysite和著名的Disqus评论系统建立了一个openid登录系统

How can I integrate these both, ie retrieve the logged in user information in the disqus commenting system preventing the users to enter their details twice on the same site else whats use of simplifying the logging in task. 我如何集成这两者,即在Disqus注释系统中检索已登录的用户信息,从而防止用户在同一站点上两次输入其详细信息,否则有什么用来简化登录任务。

Is there any api for disqus so that I can autofill the user info automatically? 是否有用于Disqus的api,以便我可以自动自动填充用户信息?

Something like this is the django_template: django_template是这样的:

{%if requet.user.is_active %}
  <!--Check if any user is logged in and if someone is then add this in the html output:-->
  var disqus_email = {{ user.email }};
  var disqus_name = {{ user.username }};
  <!--Or as in my case if active user have an openid-->
  var disqus_openid = {{ user.openid }};
{% endif %}

There is one simmilar post for this: Disqus and retrieving logged in user but looking at the response I decided to start a new question for my problem. 对此有一个类似的帖子: Disqus和检索登录用户,但查看响应后,我决定针对我的问题开始一个新问题。

Found out the solution at http://help.disqus.com/entries/100880-configure-and-override-comment-system-behaviors . http://help.disqus.com/entries/100880-configure-and-override-comment-system-behaviors中找到了解决方案。
Had to define the following for current logged in user as I already thought of in the question: 正如我在问题中已经想到的那样,必须为当前登录用户定义以下内容:

var disqus_def_name = "{{ user.get_full_name}}";
var disqus_def_email = "{{ user.email }}";

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM