Newbie Help Getting Started - Page to invite friends

Mar 2, 2008 at 5:25 PM
Hi everyone.

I've setup version 1.6 and have successfully setup an app on Facebook. I have decided to go for using the IFrameCanvas as this is the first time I am developing for FaceBook. I have compiled the help docs using Sandcastle.

We have an existing web application that I would like to modify and publish as a FaceBook App. The application is pretty straight forward, asks a bunch of questions and returns a result based on your answers. The users result and questions are all stored in a SQL database.

I have a few questions regarding the FaceBook side. I've been looking at other discussions to try and find out how I would implement a page to allow a user to invite their friends to add the application. I found the below discussion:
http://www.codeplex.com/FacebookToolkit/Thread/View.aspx?ThreadId=15597
However I am not sure if this is relevant to what I want to do.

Having a look through the documentation this is how I think it would be done:
1. Use GetFriends method to get friends of logged in user
2. Use GetFriendsAppUsers method to get a list of friends who have already added the app.
3. Use these to produce a list of users to allow the logged in user to select who to invite.
4. Use SendNotification(string markup, string toList) to send request to add app to all selected users.

Am I on the right path with this? Also if this is correct, can anyone provide me an example of FBML markup I would send using this?

Sorry if I am asking such straight forward questions or if I seem to be completly confused and I would absolutely appreciate any help you can give me.

Mar 3, 2008 at 12:11 AM
Mate,
Using notification is not good for inviting friends. it could block your application.

as long as you are going to invite each users' friends, this will result in sending more than 100 notificaiton. YOUR APPLICATION SPAMMY WILL BE HIGH.

Use FacebookNet library, and this page for invitation:

<%@ Page Language="C#" %>

<%@ Import Namespace="Facebook.Service" %>
<fb:FacebookApplication ID="fbApplication" runat="server" Mode="Fbml" ApplicationName="helloWorldFbmlApp"
EnableDebugging="true" />
<fb:fbml version="1.0">

<div>
<fb:request-form action="default.aspx" method="POST" invite="true" type="ParcelPoke"
content="Hi there, this is a great new application, <fb:req-choice url='http://apps.facebook.com/YourApplication/default.aspx' label='Confirm' />">
<fb:multi-friend-selector showborder="false" actiontext="Invite your friends to use YourApplication.">
</fb:request-form>

</div>
</fb:fbml>
Mar 3, 2008 at 12:10 PM
Hi Mido

Understood with notifications, the above all seems to be FBML I am actually using iFrame's for the application.

How would you accomplish the above using the iFrame canvas page approach?

Kind Regards
Mar 3, 2008 at 2:07 PM
I think this page should help any newbie wondering about the invite friend page.
Mar 4, 2008 at 4:12 PM
Edited Mar 4, 2008 at 4:13 PM
You'll notice that midowazzan's example uses the multi-friend-selector FBML tag. as you may realise, you cant use FBML in iFrame apps, and as such you can't use this nice friend selector.

however, there does seem to be a workaround for iframe users, as you can read here http://wiki.developers.facebook.com/index.php/Multi_friend_selector

unofortunately I probably wont be of any further help as I've not done any iframe app developement, but I hope the above link helps.

edit: although I see from your other posts you are already on this path :)
Mar 5, 2008 at 7:31 PM
I think this link would be of interest for Tej

http://forum.developers.facebook.com/viewtopic.php?pid=44050


Mar 6, 2008 at 9:55 AM

GurlalSingh wrote:
I think this link would be of interest for Tej

http://forum.developers.facebook.com/viewtopic.php?pid=44050



Not using FBML in any case I've managed to resolve this, see this article for help:

http://www.codeplex.com/FacebookToolkit/Thread/View.aspx?ThreadId=15597