Import contacts list in rails

By , June 15, 2009 1:42 am

Nowadays “Invite a friends” functionality is very common in all websites. This functionality is consider as quickest and easy way marketing approch.

MySpace, Twitter sites are using contact imported tool which is load ur all contacts (You need to just provide email and password and select the emails).So users can easily invite their friends without too much hard work.

Now you can do same thing by integrate Plaxo in your web site.you have to just follow few steps.

Step 1: Create a view page in your app and following code in that (Example: contact.html.erb)


<script type="text/javascript" src="http://www.plaxo.com/css/m/js/util.js"></script>
<script type="text/javascript" src="http://www.plaxo.com/css/m/js/basic.js"></script>
<script type="text/javascript" src="http://www.plaxo.com/css/m/js/abc_launcher.js"></script>
<script type="text/javascript"><!--
function onABCommComplete() {
// OPTIONAL: do something here after the new data has been populated in your text area
}
//--></script>

Step 2: Create a another view page (Example: contact_list.html.erb). This page is used to load the contacts in text area.

<html>
<head>
<script type="text/javascript" src="https://www.plaxo.com/ab_chooser/abc_comm.jsdyn"></script>
</head> <body></body> </html>

Step 3: Add below in contact.html.erb file


<textarea id="recipient_list" name="recipients"></textarea>.
<a href="#" onclick="showPlaxoABChooser('recipient_list', '/CONTROLLER_NAME/contact_list'); return false">
<img src="http://www.plaxo.com/images/abc/buttons/add_button.gif" alt="Add from my address book" />
</a>

Remember: In showPlaxoABChooser , first argument is textarea id and second argument is callback page (here contact_list page).

Till this process , you can only able to import the contacts into textarea. I hope you know that how to send email after that.

Let me know if you find any problems.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Webnews
  • Digg
  • del.icio.us
  • Reddit
  • Bloglines
  • LinkedIn
  • YahooMyWeb
  • Facebook
  • Google Bookmarks
  • Mixx
  • MySpace
  • Technorati
  • TwitThis

3 Responses to “Import contacts list in rails”

  1. peter says:

    hi
    but why this script don’t support hotmai.com??

    and then i choose my contacts list to add it it take time so the user can’t wait
    and maybe it don’t add to text field

  2. Brijesh Shah says:

    Hi Peter,

    I used the plaxo api and this api does not support to hotmail.

    Its works fine for me. All the contacts are loaded successfully in text field by taking minimum amount of time.

Leave a Reply

*

Panorama Theme by Themocracy