Home > invite_example

invite_example

Invite_example is a project mainly written in PHP, it's free.

Sample code for the InvitesDoneRight service

invite_example



This code demonstrates how to use the InvitesDoneRight service to get a
high-quality shortlist of contacts for a user. You can then show this
shortlist to the user and let them pick friends to send invites too. This
is a much better user experience than a space-shuttle control-panel list of
their entire address book, and the improved targeting means fewer spam
reports from recipients and higher conversion rates.

To use it, simply add a step to your account creation process that
redirects to InvitesDoneRight, passing the email address for the user and
a URL to return a contacts shortlist to:

http://invitesdoneright.com/?emailaddress=someone%40gmail.com&callback=http%3A%2F%2Fweb.mailana.com%2Flabs%2Finvite_example%2Fcallback.php

The service will then take the user through the Gmail or Yahoo mail 
authorization process, and redirect to the callback URL you specified, 
passing information about the user's most frequent contacts in the
contactsinfo URL parameter.

If there's an error, the user refuses access or it's an unsupported email 
provider, they'll still be redirected back to your URL, but the 
contactsinfo parameter will be empty.

This sample code shows the whole process in PHP. To use it on your own 
site, just edit CALLBACK_URL in config.php. A live version runs at
http://web.mailana.com/labs/invite_example/

For full documentation on the service, see 
http://wiki.github.com/petewarden/invitesdoneright/

Pete Warden <[email protected]>
Previous:web.js