Plaxo 电子邮件联系人小部件无法将电子邮件地址返回到应用程序服务器
我正在尝试使 plaxo 的地址簿访问正常工作。我遇到以下问题:
当用户位于根 URL 上时,我的整个用户登录过程都是通过 ajax 完成的。当用户成功登录时,我渲染landing/logged_in.js.erb
,其中包含
$("#content").html("<%= escape_javascript(render :partial => 'email_invites/invite_people') %>");
$("#content").show();
$(".welcome").hide();
// email widget stuff:
$.getScript("https://www.plaxo.com/ab_chooser/abc_comm.jsdyn", function(){
//alert('Load was performed.');
});
$.getScript("http://www.plaxo.com/css/m/js/util.js", function(){
//alert('Load was performed.');
});
$.getScript("http://www.plaxo.com/css/m/js/basic.js", function(){
//alert('Load was performed.');
});
$.getScript("http://www.plaxo.com/css/m/js/abc_launcher.js", function(){
// alert('Load was performed.');
});
email_invites/invite_people.html.erb包含
<a href="#" onclick="showPlaxoABChooser('recipient_list', '/'); return false"><img src="http://www.plaxo.com/images/abc/buttons/add_button.gif" alt="Add from my address book" /></a>
<br /> `
<%= form_tag send_email_invites_path, :remote => true do %>
<%= text_area_tag "emails", @emails, :id => 'recipient_list' %>
<%= submit_tag "Send invites!" %>
<% end %>
我认为问题出在哪里:第二个参数to showPlaxoABChooser()
是回调页面的绝对路径,由于我们仍在根 URL 上,因此应该是 /
,对吗?
目前,用户单击“从我的地址簿添加”,然后离开网站以选择他们的联系人。用户选择联系人后,小部件无法通过包含其所选联系人的请求返回我们的网站(小部件表示请永远
)。
我将不胜感激任何帮助。
I'm trying to get plaxo's Address Book Access working. I'm having the following problem:
My entire user login process is done via ajax while the user is on the root url. When the user successfully logs in, I render landing/logged_in.js.erb
which contains
$("#content").html("<%= escape_javascript(render :partial => 'email_invites/invite_people') %>");
$("#content").show();
$(".welcome").hide();
// email widget stuff:
$.getScript("https://www.plaxo.com/ab_chooser/abc_comm.jsdyn", function(){
//alert('Load was performed.');
});
$.getScript("http://www.plaxo.com/css/m/js/util.js", function(){
//alert('Load was performed.');
});
$.getScript("http://www.plaxo.com/css/m/js/basic.js", function(){
//alert('Load was performed.');
});
$.getScript("http://www.plaxo.com/css/m/js/abc_launcher.js", function(){
// alert('Load was performed.');
});
email_invites/invite_people.html.erb contains
<a href="#" onclick="showPlaxoABChooser('recipient_list', '/'); return false"><img src="http://www.plaxo.com/images/abc/buttons/add_button.gif" alt="Add from my address book" /></a>
<br /> `
<%= form_tag send_email_invites_path, :remote => true do %>
<%= text_area_tag "emails", @emails, :id => 'recipient_list' %>
<%= submit_tag "Send invites!" %>
<% end %>
Where I think the problem is: The second argument to showPlaxoABChooser()
is the absolute path to the callback page, which, since we're still on the root url, should be /
, correct?
As it is currently, the user clicks "add from my address book" and is taken off of the site to select their contacts. After the user selects contacts, the widget is unable to hit our site back with a request containing their selected contacts (widget says to please wait
forever).
I'd appreciate any help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否实现了 plaxo 用于传递联系人的 onABCommComplete javascript 回调函数?
尝试添加
到 onABCommComplete 函数。
Did you implement the onABCommComplete javascript callback function that plaxo uses to pass the contacts?
try adding
to the onABCommComplete function.
plaxo 将电子邮件地址返回到应用程序服务器时点击的 url 需要与启动小部件的 url 不同。
效果很好!
The url that plaxo hits when they return the email addresses to the app server needs to be different than the url that the widget is launched from.
Works great!