Facebook Tab Manager for WordPress Shortcode Options

Facebook Tab Manager has been upgraded to include a few new shortcode options.

  • To include a JavaScript widget, such as one of the Facebook Social Plugins, paste it into the WordPress editor in Visual mode and wrap it with [fbtab]WIDGET-CONTENT-HERE[/fbtab]. The shortcode processing function will fix the HTML entities the editor adds on angle brackets and quotation marks.
  • To include blog post or paste content, you can use [fbtab query="QUERY-STRING"] where the query string is something like p=1 category_name=facebook-tab-manager — see the documentation for the query_posts function for possible values. You can also use a format attribute of format="headline" or format="excerpt".
  • Update: Also see the post on conditional display of content depending on whether the user has Liked / not yet Liked your page.

See the Tab Manager tab at http://www.facebook.com/carrcomm for an example using [fbtab query="category_name=facebook-tab-manager" format="excerpt"]

Here is what it looks like in the editor:

fbtab shortcode

WordPress makes it easy to generate the JavaScript XFBML code used here with the utilities on the Social Plugins page. For this example, I left the ID field blank, allowing the widget to default to associating content with the page it is embedded in (in this case, the underlying web page that appears in the iframe).

Obtaining Social Plugin Code

If you’re using other WordPress plugins to generate FB integration code, some of what I’m showing here may not be necessary. But it still may be handy for some folks trying to get stuff done quickly.

For updated documentation, see facebooktabmanager.com
Share:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • email
  • LinkedIn
  • MySpace
  • PDF
  • Slashdot
  • StumbleUpon
  • Suggest to Techmeme via Twitter
  • Technorati
  • Twitter
  • Yahoo! Bookmarks
  • Yahoo! Buzz
Posted in Facebook Tab manager, WordPress | 26 Comments

Updates to Facebook Tab Manager for WordPress

Version 1.4 of Facebook Tab Manager is available now in the WordPress repository, with additional features for customizing the display of your content.

Apologies to those who downloaded the first day release and got a bit too much of the “beta tester” experience. I rushed it out too fast and had to immediately put out couple of bug fix releases. Despite that, Facebook Tab Manager is featured today in a tutorial on WPMU.org as an easy way of adding WordPress content to Facebook.

Version 1.4 features a couple of important enhancements, in addition to those I slipped in while I was busy fixing bugs.

One thing I discovered is that some plugins modify or append content on custom post types like my Facebook tabs (treating them as if they were regular blog posts) in ways that might not be appropriate for Facebook tab content. So I’ve added the option to selectively turn off filters. They function that removes them is embedded in the template for the fbtab content type, so it won’t interfere with the display of other content on your site.

I’ve also added an option to make links open in a new window (for example, if you’re linking to pages that won’t display well within the 520px-wide Facebook tab IFrame).

Additionally, you can enable the output of the wp_header and wp_footer functions, which may be required to invoke JavaScript or CSS output. I don’t do this by default in the fbtab template because it may result in output that’s only appropriate for display on your website, not in a tab.

Let me know if you see other things that need improvement.

Facebook Tab Manager options

For updated documentation, see facebooktabmanager.com
Share:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • email
  • LinkedIn
  • MySpace
  • PDF
  • Slashdot
  • StumbleUpon
  • Suggest to Techmeme via Twitter
  • Technorati
  • Twitter
  • Yahoo! Bookmarks
  • Yahoo! Buzz
Posted in Facebook Tab manager, Social Media, Web Development | 9 Comments

Adding a Form to a Facebook Tab Using Caspio or ExpressDB

I’ve been doing a number of experiments with the new Facebook page tabs, including my work on the Facebook Tab Manager for WordPress. There are a number of other great ways of adding interactive content to your Facebook pages using this technique, and two others I think have great potential are using Caspio Inc.’s online database services.

I’ve been doing some consulting for Caspio and had previously tried integrating these cloud database services using the Facebook Markup Language (FBML) technique Facebook provided for page tabs. I could never quite get it to work. Facebook previously allowed you to use IFrames – embedded HTML frames – for Facebook applications, but page tabs had to be FBML. FBML works with Facebook JavaScript standards to display content and applications, but it imposes more limitations than content viewed in a frame.

Now, Facebook is moving away from FBML, which in some ways was a subset of HTML, toward XFBML, which is more of a superset and can be used on external websites that want to offer Facebook integration as well as in IFrames on Facebook. Just last week, Facebook announced the release of IFrame support for page tabs. And my Caspio apps work just fine in that context.

Caspio is best known for Caspio Bridge, an easy-to-use visual designer for creating online databases, reports, charts, and graphs. Once you have created an application using the web-based wizards, you just copy and paste a snippet of JavaScript code to load the form or report into your web page. In other words, adding an app to your web page — and, now, your Facebook page — becomes as easy as adding a YouTube video.

For an example of a contact form build with Caspio, visit www.facebook.com/caspioinc and click the Caspio Demos tab. Sample interactive reports for job listings and real estate listings are also available.

For the example shown below, I’m using another Caspio cloud database service, ExpressDB. ExpressDB provides a simple way for web designers and HTML coders to create interactive forms without hassling over the details of programming and database setup. ExpressDB takes the input from your form and automatically creates a database to match, reliably storing whatever data you choose to capture. This has to be the absolute simplest way of creating something like a lead capture or customer contact form to add to your Facebook page.

For either a Caspio or an ExpressDB app, I recommend following the same pattern.

  1. Create a directory on your web server for the content you want to appear on your Facebook tab.
  2. Save the web page containing your Caspio app (the JavaScript code provided by Caspio Bridge) or your ExpressDB form as the index file for that directory.
  3. Use a file name such as “index.php” (on Unix systems) or default.asp (Windows) where the PHP file extension indicates the file is capable of processing server-side programming code. Facebook will post some data to this page, so even if you don’t include programming code, the index file should be capable of doing so (some servers may respond with an error message if they receive an HTTP POST directed at a static HTML file).
  4. Register the application by filling out the Facebook Developers form. For the Canvas URL variable, use http://www.mysite.com/myapp/ and for the Tab URL (which must be different) use http://www.mysite.com/myapp/index.php (or whatever the name of your index file is). In this case, both URLs will actually access the same content.

Here is how it would work with ExpressDB. First, I create a basic form:

Basic Form Design

A basic form in Dreamweaver

I log into ExpressDB and provide a name for the form. I’ve also created a custom “Thank You” page to use instead of the default, so I enter the address for that page into ExpressDB.

ExpressDB setup

ExpressDB setup

ExpressDB generates an activation key for my form, which is actually the opening <form> tag, coded to point to the expressdb.com service with an AppKey parameter for my new database.

Action Tag

Adding the ExpressDB form action tag

I save this on my server as /fbsurvey/index.php and log into the developer’s page on Facebook to register my application.

Facebook parameters

Facebook parameters

These parameters mean that my survey will be available on Facebook at apps.facebook.com/carr-survey/ but I can also add it to any page as a tab that will be labeled Survey. After saving your work, visit the Application Profile Page Facebook creates, and you will see Add to my Page as one of the links on the left hand side.

Here is the survey on my Facebook business page:

The app on my page

The app on my page

And here is the Thank You message displayed after I click submit:

Thank you page

Thank you page

Finally, here is the same content displayed as a stand-alone app (with a little more screen real estate).

Viewed as an app

Viewed as an app

The file naming scheme I recommended here is offered for the sake of simplicity. You could also have the content available at the app, or canvas, URL be different from what you show on the tab. In fact, I think that’s what Facebook is expecting you to do. In that case you would make your app content the index.php file and make the tab content myapp.php or whatever.

That’s essentially what I did to create the Caspio app and page tab, where the canvas URL points to a page that displays several Caspio apps, some of which require a wider frame, and the page tab URL points to a version that includes just a contact form example (which happens to fit neatly with in the page tab frame).

The width of your content is definitely one of the things you have to plan your apps around. A Facebook page tab is currently specified as maximum width 520px, and you also want to allow for some padding around the edges. A Facebook canvas page is 760px, but you might want to aim for 740px if you don’t want scroll bars displayed.

Getting it right takes some experimentation, but when it works, it works great.

Share:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • email
  • LinkedIn
  • MySpace
  • PDF
  • Slashdot
  • StumbleUpon
  • Suggest to Techmeme via Twitter
  • Technorati
  • Twitter
  • Yahoo! Bookmarks
  • Yahoo! Buzz
Posted in Social Media, Web Development | 2 Comments

Experiments with Facebook iframe Tabs, Facebook Tab Manager WordPress Plugin

I’ve been doing a bunch of experiments with the new Facebook iframe page tabs and have cooked up a Facebook Tab Manager plugin for WordPress, which works pretty well. This plugin lets you compose and edit content for your a tab to appear on your Facebook business page (or campaign page or nonprofit page) from within WordPress. I use custom post types to treat Facebook tabs a just another kind of post, and the content can be integrated with other plugins using WordPress Shortcodes.

The content is displayed in a very simple template with none of your site’s normal navigation, etc. That makes it easier to make it fit into a Facebook layout. I provide some default styles, but you can also add custom CSS on a per post (or per tab) basis.

You can see an example iframe Facebook tab at http://www.facebook.com/carrcomm?sk=app_188292324537166

As part of some promotional work I’ve been doing with cloud database company Caspio Inc., I’ve also created custom tabs you can see on the Caspio Facebook page and ExpressDB Facebook page. These demonstrate how data entry forms and database reports from Caspio’s online database products can be embedded in a Facebook page.

Overall, I’m finding that these iframe based tabs are much easier to work with. Previously, page tags had to be coded in FBML (the Facebook Markup Language). Now Facebook is phasing out FBML in favor of XFBML, a version of the language you can embed in any web page, which works in combination with the Facebook JavaScript SDK. XFBML can also be used within an iframe page.

Using the full set of Facebook APIs, it’s possible to do much fancier things than I’ve attempted so far. But I’m happy to see that I can also do relatively simple things easily.

For updated documentation, see facebooktabmanager.com
Share:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • email
  • LinkedIn
  • MySpace
  • PDF
  • Slashdot
  • StumbleUpon
  • Suggest to Techmeme via Twitter
  • Technorati
  • Twitter
  • Yahoo! Bookmarks
  • Yahoo! Buzz
Posted in Facebook Tab manager, Social Media, Web Development, WordPress | Tagged , , , , | 10 Comments

RSVPMaker WordPress Plugin Passes the Version 1.0 Mark

RSVPMaker button

Over the weekend, I posted version 1.0 of my RSVPMaker WordPress plugin … swiftly followed by version 1.1 with some bug fixes. Still, it’s a milestone, even if only an arbitrary one. I called the initial release in November 0.6, recognizing that even though I’d been playing with variations on this code for years, it would need to go through a shakedown to be generally useful to a variety of people and organizations. Now, I think it’s getting there, even though plenty of room for improvement remains.

I wrote about the learning process I’ve gone through with this project a couple of weeks ago (My Open Source Adventure with RSVPMaker). The couple of glitches that popped up with the 1.0 release weren’t show stoppers, just unexpected side effects of the latest changes. For example, I added an uninstall.php file without understanding that WordPress automatically looks for a file by that name and runs it when a user wants to delete a plugin. So I had to alter its behavior to remove database entries automatically, without prompting the user to make choices. I provided a separate cleanup.php file for users who want to clean the database more selectively.

One of the tradeoffs of open source development without a budget is everyone becomes a beta tester. Still, it was nothing that couldn’t be quickly fixed, once I became aware it was a problem.

Overall, I’m happy with the way RSVPMaker handles simple events and lets you add special parameters like RSVP start and end dates as necessary.

Share:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • email
  • LinkedIn
  • MySpace
  • PDF
  • Slashdot
  • StumbleUpon
  • Suggest to Techmeme via Twitter
  • Technorati
  • Twitter
  • Yahoo! Bookmarks
  • Yahoo! Buzz
Posted in Web Development, WordPress | Tagged | Leave a comment

Caspio Makes It Easy to Create Facebook Apps

With Caspio, creating Facebook apps is as easy as creating any other kind of web database application. Visit http://apps.facebook.com/caspio-demo-apps/ to see several of the familiar samples from our App Gallery running inside Facebook, as shown below.

Sample Caspio Apps on Facebook

This is a powerful capability, allowing you to interact with Facebook users within the comfortable environment of the service, rather than asking them to click away to another website. You can include the Facebook page address for your Caspio application in Facebook advertising campaigns, or in links you send to other users.

The process takes just a few easy steps. You register your application with Facebook, setting the application “canvas” to either the Direct from Caspio deployment URL or the web address of a page on your own site in which you have embedded the Caspio JavaScript widget. Detailed instructions are available at howto.caspio.com.

Note: I’m working with Caspio on promotional writing for their service.

Share:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • email
  • LinkedIn
  • MySpace
  • PDF
  • Slashdot
  • StumbleUpon
  • Suggest to Techmeme via Twitter
  • Technorati
  • Twitter
  • Yahoo! Bookmarks
  • Yahoo! Buzz
Posted in Web Development | Leave a comment

How to Create a Facebook Contact Form Using ExpressDB

As Facebook becomes increasingly important for businesses who want to interact with customers online, many business managers are looking for simple ways of adding interactivity to their Facebook marketing campaigns. Ideally, you want to be able to give Facebook users a way to do things like fill out a contact form without being redirected to another website. ExpressDB provides a simple way of accomplishing this.

Note: I came up with this demo app as part of my work with Caspio, the maker of ExpressDB.

ExpressDB is a service of Caspio Inc. that will record the input from any web form with zero database configuration. Just point your form at the ExpressDB service, and you’re done.

To put a form on Facebook, you start by preparing your form as usual, replacing the action tag in the form’s HTML with the one generated by ExpressDB. The ExpressDB forms gallery provides several common types of forms, such as contact and inquiry forms, that you can download and customize. The resulting web page with all formatting should be no more than 700 pixels wide to display properly on Facebook.

Copy the ExpressDB activation code and use it to replace the <form> tag in your HTML

Upload the page to your website and confirm that it works as a stand-alone web form. Next, we’ll turn it into a Facebook app.

Now log into Facebook and visit the developers section. You won’t have to do any programming, but you do need to fill out an online application to register your web form as a Facebook app.

Click on the Set Up an App button. Type in a name for your App, agree to the terms of service, and click Create App.

You now need to add your domain and the address of your web page in a couple of different spots. Facebook expects you to append a query string to the end of the web address, and here we’ve just added ?facebook after our HTML filename. For the domain, you should fill in just the root address without the http part (“www.demo.com” in this example).

Step 1

On the Canvas page, enter the address you’re requesting to be assigned to this application. In this example, we have entered “expressdb-contact” which means the application will be available at http://apps.facebook.com/expressdb-contact/

Step 2

Once you have saved these settings, you should be able to navigate to the app page address you established and see your form. Note that there is room in this example to add more branding and promotional copy along with the form. You can also use this web address as the landing page for Facebook advertisements, targeted by interests, affiliations, demographics, and geography.

Your form on Facebook

When a user submits the form, ExpressDB will display either the default confirmation page shown below or a custom confirmation page, if you’ve configured one within ExpressDB.

The ExpressDB confirmation page on Facebook

Learn more at www.expressdb.com. For a richer, but still very easy to use online database environment for creating forms, reports, charts, graphs, mashups, check out Caspio Bridge and the instructions for publishing Caspio apps to Facebook.

Share:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • email
  • LinkedIn
  • MySpace
  • PDF
  • Slashdot
  • StumbleUpon
  • Suggest to Techmeme via Twitter
  • Technorati
  • Twitter
  • Yahoo! Bookmarks
  • Yahoo! Buzz
Posted in Web Development | Tagged , , | Leave a comment

New Version of the Caspio WordPress Plugin

WordPress makes publishing and updating a website easy. Caspio makes creating database forms, reports, and applications just as easy. Together, they’re even more powerful, particularly with the new Caspio WordPress plugin.

Now you can add Caspio applications to your WordPress posts and pages using a WordPress shortcode format. This works in both Caspio’s embedded and SEO Deployment modes. Read our Deploy Caspio DataPages in WordPress tutorial for details, but you can see how it works below.

Here is the [caspio] shortcode placeholder in the WordPress editor …

The caspio shortcode

… and the result on the published page …

A contact form, served from the Caspio cloud database service and embedded in a WordPress page

Learn more or download it now.

Share:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • email
  • LinkedIn
  • MySpace
  • PDF
  • Slashdot
  • StumbleUpon
  • Suggest to Techmeme via Twitter
  • Technorati
  • Twitter
  • Yahoo! Bookmarks
  • Yahoo! Buzz
Posted in Web Development | Leave a comment

Caspio Plugin Update

Version 1.1 of the Caspio Deploy2 WordPress plugin simplifies the shortcode format you can use to include content from the cloud database service. Instead of pasting a JavaScript or PHP snippet into the WordPress editor, you can paste the URL for the service into a [caspio] shortcode format. This is modeled on the way WordPress lets you embed videos using the [embed] shortcode.

To get that URL, toggle the deployment window to “Direct from Caspio” and copy the address as shown below.

Copy the "Direct to Caspio" URL

Embedded deployment (JavaScript widget):

[caspio]http://b4.caspio.com/dp.asp?AppKey=5F422000c3f2d8h4d3c9f4b9g9e0[/caspio]

SEO Deployment (content pulled from Caspio, then delivered from your server):

[caspio seo="http://b4.caspio.com/dp.asp?AppKey=5F422000c3f2d8h4d3c9f4b9g9e0" style="l"]

If you omit the style parameter, the default value of “l” (lower case “L”) will be used.

The output from these two examples is shown below. Note that the second version, the SEO Deployment one, looks slightly different because it is picking up CSS stylings from this website.

Online Database by Caspio


Click here to load this Caspio Online Database.

This DataPage is not configured for public access. (Caspio Bridge error) (50510)

Share:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • email
  • LinkedIn
  • MySpace
  • PDF
  • Slashdot
  • StumbleUpon
  • Suggest to Techmeme via Twitter
  • Technorati
  • Twitter
  • Yahoo! Bookmarks
  • Yahoo! Buzz
Posted in Web Development | Leave a comment

My Open Source Adventure with RSVPMaker

After several years of mooching off the open source software community, I finally gave something back: an event management and RSVP tracking plugin for WordPress called RSVPMaker. You can see some sample events and respond to the RSVPs at www.rsvpmaker.com, a demonstration and documentation website I set up to support this project.

I put out the first release in November, and as of this writing RSVPMaker has been downloaded more than 800 times.

As a writer and editor whose programming skills are largely self-taught, I was somewhat hesitant to put my code out there for all to critique. But RSVPMaker has been pretty well received, particularly by people who say it’s more flexible than some other event plugins to WordPress that they have tried.

The RSVPMaker plugin is new, but it’s based on PHP code I developed and refined over a period of years for event management on websites I managed for political campaigns, community organizations, and business networking groups.

Because I found I had to adapt the event and RSVP functions to work slightly differently in several different contexts, I designed RSVPMaker to support several different event management scenarios. For example, sometimes you want to request RSVPs, and other times you just want to publicize your event. Sometimes you want to collect money online, and sometimes you don’t. If you’re signing up volunteers, maybe you want people to check off specific timeslots when they can be available. I thought of putting in a deadline for accepting RSVPs, and then someone else said he also needed to be able to specify a start date before which RSVPs would not be accepted.

I tried to provide as much flexibility as possible, and then also give the more advanced users a way of writing their own plugins to change the behavior of my plugin. Certain functions, such as the one for displaying the RSVP form, can be modified to add or change the fields on the RSVP form.

A few things about the process surprised me:

  • So far, nobody has actually critiqued the programming code. That’s both good and bad: I wouldn’t mind some constructive suggestions about how to tighten it up or make it more efficient. Mostly, people download it, try it, and give me feedback on additional or different functionality they would like to see. So far, nobody has pointed out programming flaws or sent me corrections or upgrades as PHP code.
  • I thought translation to other languages was something I wouldn’t have to think about until I got to a much more advanced phase of development. But the first person who contacted me with feedback was from Denmark, and I’ve heard from people in France and other countries as well who mentioned the need to translate portions of the user interface. I’ve gotten as far as putting in the placeholders for translated or localized phrases, but still need to find partners who speak these other languages to do the actual translation. It remains to be seen whether there will be enough interest that these volunteers will come forward.
  • I ran into problems with some functions working fine on my server and apparently those of some other website operators, but not for a few people who found the links to the event pages didn’t work. Trying to debug what was different about the systems of the people who were having problems, vs. those who weren’t, turned out to be quite a challenge. In the case of the missing links, I had to implement some of my code the “wrong” way, according to the documentation, but the only way it would work for one of these people. Then, since her problem seemed to be the exception to the rule, I made it a special tweak that only gets executed if you turn it on.

Overall, it’s been a rewarding and interesting process — and I’m just getting warmed up. I started out with release 0.6, figuring the code was a little more than half-baked. I’ve worked my way up to version 0.9 and will probably declare it to have achieved version 1.0 within the month.

Share:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • email
  • LinkedIn
  • MySpace
  • PDF
  • Slashdot
  • StumbleUpon
  • Suggest to Techmeme via Twitter
  • Technorati
  • Twitter
  • Yahoo! Bookmarks
  • Yahoo! Buzz
Posted in Web Development, WordPress | Tagged , | 1 Comment