Beginner Questions

Jul 11, 2007 at 9:58 PM
I'm really confused and I was hoping someone could clarify some things for me. There might be some dumb questions mixed in here but I have to ask, haha. Ok, so I work for a fundraising company. What I want is to be able to display what organizations a user fundraised for in their profile box. Kind of like badges. I'm confused on how to go about this. How do you actually put things in a user's profile box? Do I have to use FBML or can I use with this toolkit? When I read the tutorials and stuff I see how to grab information off of facebook but I don't see how to put information on. If anyone has anything good I should read or any advice it would help, thanks.
Jul 12, 2007 at 1:42 PM
You can use the toolkit to write to the profile, but you have to use FBML.

The SetFBML call of the FacebookService wraps the Facebook API call from writing to someone's profile. You can write to the profile from any app type (desktop, standalone web, fbml canvas, iframe canvas).

Do you plan to have any functionality in your app besides writing to their profile? If so, then you need to decide which app type to use based on how your users should interact with your application.

If not, I am not sure how you will know about the userids of the user's to write to. Also, I am not certain if you can write to profile of people who are not "users" of you app. You'll have to try that.

The SetFBML call basically posts static content (which can include pictures, links etc) to someone's profile. You can do that from an app. But, the portion would be used for displaying your actual app. And then posting to the profile when certain events happen.
Jul 12, 2007 at 6:08 PM
Basically the only functionality I was looking for was posting what organizations they donated to. I only wanted to write to the profile of people who are users of the app though. For the actual app, I would just want the user to be able to add or remove an organization. Maybe I could put some additional information, but I wasn't looking for much beyond that.

So for using SetFBML, do I pretty much just say SetFBML( appropriate parameters )? I think I still don't get the format of an application. From what I understand, you want to have a canvas page and a profile box. From the options on new facebook application form, I saw how you can just post any page for the canvas page, and my application currently just has a page up that says "this is a test". But where do I put the code for posting to a profile box? Does it go on that same page? That's one of the things I don't get.
Jul 12, 2007 at 7:09 PM
I'm not sure I follow you completely. But, I'll try to explain and hopefully it will clarify somethings.

If you want a canvas app, you setup your dev account and pick either iframe or fbml canvas app. I have base pages that you can use for either which help solve all of the authentication/adding the application issues.

The basic difference is that an iframe app you can host the content and facebook will just display an iframe showing whatever your url returns. The nice thing about this is you get a very typical web dev experience. FBML canvas has some cool integration and pre-built controls that help you build a page with facebook look and feel. In the 1.2 version of the toolkit, the doc has a simple walkthrough for building either type.

Now, within your canvas, users will be accessing and in your case saving the orgs they donated to. You can handle the save button on your form and in the code behind call setfbml which will update their profile on behalf of your app.

So, the idea is that the response that someone gets when they post to your url is your actual app. And at any time while someone is using your app, you have the ability to use the toolkit to call SetFBML which writes info to their (or another user's profile) based on the action they did.

Jul 13, 2007 at 5:16 PM
I think I'm starting to understand. Where are those base pages? I think if I saw an example of it I'll fully understand. Thanks for all the help.
Jul 13, 2007 at 6:18 PM
The base pages are in Facebook.WebControls. There is documentation explaining how to use them in the 1.2 version of the doc.