Archive | How-To’s RSS feed for this section

How to Insert “Add Profile Tab” Buttons

As described in an official blog post from Facebook, you can now put an “Add Profile Tab” button in your application or site to prompt users to add your application tab to their profiles for easy re-engagement. All implementations using the JavaScript API can call FB.Connect.showProfileTabDialog or use the fb:add-profile-tab XFBML tag to render the button, while FBML applications can call Facebook.showProfileTabDialog or use the fb:add-profile-tab FBML tag to render it.

Using the JavaScript API for Connect

FB.Connect.showProfileTabDialog(callback);

This method renders an Add Profile Tab button on your canvas or Web page, enabling the user to add your application tab to his or her profile.

If the user already added your application tab, the button doesn’t appear.

You can determine if a user added your application tab by querying the tab_added field in the permissions FQL table.

The optional Callback function can be used to execute after this call completes. It takes one argument, which is a JavaScript object. The object has one key, tab_added, the value for which is 1 or 0.

Using an XFBML tag

<fb:add-profile-tab />

or, if you’re using Connect

<fb:add-profile-tab></fb:add-profile-tab>

Renders a button that lets a user add your application or site’s application tab to his or her profile. Make sure you specify a Tab Name and a Tab URL in your application settings (on the Profiles tab).

If the user already added your application tab, the button doesn’t appear.

You can determine if a user added your application tab by querying the tab_added field in the permissions FQL table.

Facebook Gift Application Script

The Facebook gifting craze is upon us. Do you receive random gifts from people you do not even know? Are you guilty of sending a snowball, starting a pillow fight, a Christmas decoration, a mixed drink or anything else to your entire friends list? Gift giving is going full throttle on Facebook. Why just say Hello to someone when you can say Hello with an item as well.

Now with our easy to use Gift Giving script you can create your own gift application. You control what gifts are available.

Version GiftApp3.6

Demos:
Jones Soda – http://apps.facebook.com/jonessoda/
All Holidays – http://apps.facebook.com/allholidays/


What’s New in Version 3.6:
- Upload feature for adding gifts. Simply browse and select the gift image and it uploads automatically.
- Help and Ticket system added so users can support a Help request and you can manage all tickets as an admin.
- Multi-Admin. Ability to have multiple admins if you wanted to have friends or partners help manage and add gifts, etc.

What’s New in Version 3.5:
- Categories! Create your own categories and allow users to select categories
from the send gifts tab.
- Admin ability to add points to a user.
- Leaderboard to show top senders and receivers.
- Send tab shows how many times a gift has been sent.
- Ability to add a link to each product that open up another webpage. Great to promote affiliate links or send traffic to a product page.
- Monetize with the program(s) of your choice: OfferPal, SuperRewards, or CPALead.Admin features:
- Only admin can add gifts
- Manage the cost to send each gift
- Add points to a user account
- Create categories for gifts
- Manage support tickets

Fully customizable. You do not have to be stuck with the same gifts. Simply delete the gifts and replace them with something new. Easy to do!

User Features:
- Users of your application can collect gifts. Even if you delete gifts to replace them with a different occassion, a record of sent gifts is still kept and users can view all gifts that they received by clicking the My Gifts tab.

- When a user selects a gift to send the script calculates the cost of the gift and the users point balance and allows the user to send the max amount of gifts at one time to save time.
- Leaderboard to show top senders and receivers. Creates competition between users to get on the top by using your application more.

Self Advertises:
- Viral marketing, advertising
- When a user sends a gift they will be prompted if they want to publish to their wall for others to see that they sent XYZ gift and to who from your app.
- When someone receives a gift sent from your app they too are prompted to publish to their wall advertising what was received, from who, and your app.

Has potential to explode and go viral!

Advertise your business!

Do you have a website you sell products from? How about a brick and mortar store front? Facebook has a huge audience and you can advertise your products by creating a gift application!

Place banners for your business throughout the application, name the application after your business AND make the gifts items you sell!

Your an Italian restaurant? Place items off of your menu as gifts. You sell antique toys online? Place antique toys as gifts. Just about any business can advertise their products using a gift app. Build up hype and get people interested in your business. After receiving a mouth watering pizza or an old toy you remember from your childhood people will look further into the business being advertised.

Affordable advertising! One time fee to buy the software and unlimited exposure.

Affiliates!

If you do not have a business, then promote someone elses! Ever hear of Harry & David pears? They are the world’s best tasting pears! Join as an affiliate of a well known product and create a gift application around their products. Placing your affiliate links and banners throughout the application.

Make money from your application!

Sending gifts costs credits. Users receive credits for free for logging into the app each day and by accepting gifts that are sent to them.

Should a user want to send gifts beyond the amount their credits allow them, then they can buy credits directly or take part in free offers such as singing up for other apps, shopping, surveys and more. This is provided by CPALead, Super Rewards OR OfferPal. Both will pay you for any actions your members do to get points.

Besides integrating with Super Rewards or OfferPal banner ads can easily be placed at the top of every page of the application. Rockyou Ads is a great company that shows Facebook related banner ads. You can even integrate with Google Adsense.

Script Requirements (for hosting)
Regular Shared Hosting
PHP5
1 MySQL Database

Summary:

- You Will Get The Full Script and Complete Setup Guide/Instructions
- Free installation available upon request

Price $30 http://mporgsoft.com/giftapp.php


GiftArtist – Create a Gift App, We Split $$$ with you

GiftArtist – Create a Gift App, We Split $$$ with you

Create a Gift App using our automated tool,  Gift Artist – http://apps.facebook.com/giftartist/ and we split 50-50 on the ad revenues generated from the ad banners displayed on your app.

We are the only FB app that gives you 50-50 revenue share and the transparency.  You will see the number of ad impressions your apps have generated and how much you have made. Payment is done weekly via PayPal.  If your gift app is promising, we will also spend money and time promoting your gift app.  Create a gift app now and Rock On! No programming needed.

Write About Your Own Apps/Games on The Facebook Journal

Write About Your Own Apps/Games on The Facebook Journal

Facebook Journal is giving you the opportunity to write about your own Facebook app/game!
You can post a review of your new app or game, write about recent updates or improvements. To do so, create an account on The Facebook Journal here, log in and start posting! Your posts will be reviewed by our team and should be live in about 1 business day.

You can even include one Google AdSense ad at the bottom of your post!

So what are you waiting for? Write your posts, increase traffic to your apps/games, spread the word and start earning money on The Facebook Journal today!

For more info and tips on how to write, click here.

Migrate to streamPublish before December 20

Migrate to streamPublish before December 20

Yes. Facebook will deprecate all previous feed publishing functions after December 20, 2009 and your applications need to move to the OpenStream API by then. The new API implements the Streams feature, which is based on the Activity Streams standard. That’s not news. And nothing after this point is news anymore, but a short tutorial on how to get ready before Facebook deprecates a few functions which your application might be using, eventually destabilisng it. One short tip at the end of it all for your application.
So as per the new Streams functionality rolled out a few days ago across all Facebook profiles, as an application, you will need a special permission, publish_stream, to automatically publish stories to a user’s wall which is visible to the user’s friends. You need to ask for that permission by prompting the user. Until you don’t have that permission, you can use the FBJS call Facebook.streamPublish to render a feed form and have the user approve or cancel the publishing of the story right there.

As I reckon, employing the FBJS call might be a better thing to do as users may not readily give your application permission to print stories to their walls whenever you want. In fact, let me present the case of why you should ONLY use the FBJS call for all the feed story publishing needs in your application.

What Facebook.streamPublish does is show a feed form to the user which has two choices, either to publish the story contained in the form to the user’s profile or skip it. And before I proceed on feed forms, a legal advice here. You cannot show feed forms to the user whenever your application feel likes, but you have to present the user a choice as he/she takes any action on your application, if they would like to have a feed story printed on their profile page and then only. The clause that mandates this behavior is DPP.VI.1 which says “You must not display a Feed form unless a user has explicitly indicated an intention to share that content, by clicking a button or checking a box that clearly explains their content will be shared.”. Moving on, a typical feed form looks like this:

How a feed form looks like

You can supply the title(Fappside.com – Facebook News), the link of the title, the description text, thumbnail paths which will be resized to 90×90 pixels, other custom properties(Founded and Category), and action links(Become a Fan). The arguments have to be passed in a JSON array alongwith some other parameters. The function is of the form:

Facebook.streamPublish: FBJS call method and parameters
Facebook.streamPublish(user_message, attachment, action_links, target_id, user_message_prompt, callback, auto_publish, target_id);

I will detail two parameters only, the rest you can find explained here.
auto_publish: If this is set to true, and the currently logged in user has already given your application stream_publish permission, the user won’t see the feed form and instead the story will get published automatically. If you set AUTO_PUBLISH false, the feed form will show up no matter what.
target_id: This argument tells on whose behalf to submit the story. If this is set to null, it defaults to on behalf of the user currently logged in. If it is the ID of a Facebook Page and the currently logged in user is the admin of that page, the story is published to the wall of the Page, on behalf of the page.

Here is some example code to print a story using Facebook.streamPublish in PHP, FBML & FBJS. I am assuming you have a application already set up and you have a FBML canvas page.

PHP: Setting up the Feed Story parameters
$feedStory = array(
‘name’ => ‘Fappside.com – Facebook News’,
‘href’ => ‘http://fappside.com’,
‘description’ => “Fappside is all about what’s in and out of Facebook, real time”,
‘properties’ => array(‘Category’ => ‘Facebook News & Reviews’, ‘Founded’ => ‘November 2009′)
);$feedStory['media'] = array(
array(
‘type’ => ‘image’,
‘src’ => ‘http://profile.ak.fbcdn.net/object2/1487/68/n187160399906_2453.jpg’,
‘href’ => ‘http://fappside.com’
),
array(
‘type’ => ‘image’,
‘src’ => ‘http://fappside.com/wp-content/themes/headlines/thumb.php?src=http://fappside.com/wp-content/uploads/2009/12/pen.jpg&h=90&w=90&zc=9&q=95′,
‘href’ => ‘http://fappside.com’
)
);
FBML + FBJS: Setting up the Javascript variables and a link to invoke the feed form
<script>
var js_feedStory = <?php echo json_encode($feedStory); ?>;
var js_actionLinks = <?php echo json_encode(array( array(‘text’ => ‘Become A Fan’, ‘href’ => ‘http://www.facebook.com/fappside’))); ?>;
var js_targetId = null; //Keep this null if you want the feed story to appear on the user’s profile
var js_userMsg = ”; //The string which appears in the text input field. Note that the user can change this before publishing
var js_headlineMsg = “What’s on your mind?”; //A text label above the text input field prompting the user to write something in the text input field
var js_callback = null; //A Javascript callback function to handle any desired flow after the story has been published or cancelled(skipped)
var AUTO_PUBLISH = false;
var js_actorId = null;
</script>

<a href=’#’ onclick=”Facebook.streamPublish(js_userMsg, js_feedStory, js_actionLinks, js_targetId, js_headlineMsg, js_callback, AUTO_PUBLISH, js_actorId);”>Publish</a>

The above setup will print a feed story that looks like this by default:
Feed story default view

and like this when the See More link in the feed story is clicked:
Feed story after clicking on See More

That’s it with the Facebook.streamPublish method. Do let me know in the comments section if you find anything while doing this yourself, interesting or annoying. Now onto the tip I promised.

This is actually handy and we have been looking for it since sometime. The Add Bookmark feature on the application canvas pages, instead of relying on the humility of the sole link in Facebook’s bottom navigation bar with the application icons to work its magic. All you have to do now is embed the FBML <fb:bookmark /> on your canvas pages and a pretty button will be rendered. It even works on profile tabs. If the user has already bookmarked your application, Facebook will know that beforehand and won’t show the button. There may also be situations where you want to know in your code if a specified user has bookmarked your application or not, and for that use the following FQL query, where $uid is the ID of the user you want to learn about.

PHP: FQL Query to retrieve information from bookmarked column of Permissions table
$facebook->api_client->fql_query(“select bookmarked from permissions where uid=’$uid’;”); //will return Array ( [0] => Array ( [bookmarked] => 0/1 ) )

I think I have talked enough uptil now. I am looking for topics to write on that may interest you, so if you already know what you like to see, holler here and I will take note, and might do something. Looking forward to a conversation now with you in the comments section.

Become a Writer for The Facebook Journal

Become a Writer for The Facebook Journal

The Facebook Journal is looking for talented writers who would like to get published and reach our ever-growing tech-oriented audience. If you have a blog, have written for blogs before or even if you are new to blogging but you know a lot about Facebook, you can become a published author on The Facebook Journal and even earn some cash.

Here are the categories in which you can contribute:

Platform News
Application/Game Reviews
Application/Game News

Benefits:

Reach to our ever-growing tech-oriented audience

Your own Google Adsense Ad on your posts that will let you generate income from your content

The Facebook Jounral is new, but it is being heavily promoted among people interested in Facebook Platform Development. Writing for The Facebook Jounal will let you make a name for yourself and also generate income on your posts. We expect our writers to write a minimum of 1 post a week. All content will be subject to moderation but you are free to write just about anything concerning the above mentioned categories.

To become a writer, please fill in the Writer Application Form.

[Photo: Flickr - Athena]