Posts Tagged with PHP

Facebook Developers Garage Presentation

Facebook - Developers Garage - PhoenixOn November 14th @ the Tempe Center for the Arts Terralever hosted Phoenix’s first Facebook Developer’s Garage. The event was a great success.  I especially enjoyed the presentations by Chris Johnson  of Terralever and Dave Morin of Facebook. I encourage everyone to look at Chris slides on marketing a Facebook application. For those of you who might be interested in what I spoke about take a look at my 15 min presentation on the “Anatomy of a Facebook App”  With so little time,  I was unable to jump to deep into the platform, but managed to get through the basic steps to create a your first Facebook Application.

Download: Anatomy of a Facebook Application
Date: November 14, 2007
Location: Tempe Center for the Arts

Facebook - feed.publishTemplatizedAction

This past week Facebook added a new method on their REST server for sending news and mini feed stories. The method is “feed.publishTemplatizedAction” and the intent of this method is to replace the existing “feed.publishActionOfUser” with a method that is more “templatized”. Here is a sample we created which is a combination of static text and data we gathered from a RSS feed. When a users first installs our application we will publish this news story.

1
2
3
4
5
6
7
8
9
10
11
12
13
actor_id: 555555555
title_template:   {actor} <fb:if-multiple-actors>are<fb:else>is</fb:else>
           </fb:if-multiple-actors> exploring the web’s premier collection of 
            student-produced digital media Made on a Mac. 
title_data: 
body_template: <b>"{title}"</b> Made by <i>{author}</i>  
           - See it at the <a href="http://url/item.php?itemID={id}">
           Apple Student Gallery</a> 
body_data: {"title":"Lost", "author":"Jared A. Jaworski","id":13243} 
body_general: 
image_1: http://url/resize3.php?image=/109.jpg 
image_1_link: http://url/resize4.php?image=/109.jpg 
target_ids:

Sample
As illustrated in the sample, if multiple users publish stories where both the title_template and body_template markup strings are identical, as well as the title_data and body_data arrays, then Facebook may aggregated the stories together. When this occurs, the {actor} token is replaced with the names of all of the users whose actions are being aggregated. Also note, that the only valid HTML tags supported in the template is the <a>, <b> and <i>.

For more information check out Facebooks wiki at Feed.publishTemplatizedAction