Archive for the ‘Facebook’ Category


>In many of Facebook Applications CSS background images are not showing some time or the background images have shrunk and are tiled 4 times over. And If I copy the image path, and paste it in another tab and do a fetch in the browser, and again go back to my app canvas page and refresh it, the image shows up, but never does it show on the first load.

If anybody having same problem then just upload these images in another domain and give it that path into FBML Application or You can use photobucket.com or imageshack for example.

Im my case i uploaded my images in photobucket and i gave the absolute path in my CSS.

>Facebook : Invite Page

Posted: June 1, 2010 in Facebook

><?php
//?fb_force_mode=fbml
require_once ‘../facebook.php’;
$api_key = ‘8b68ebaa2353e83cd906b246###’;
$secret = ‘8d4348f4bbfaa176b0c29e364f###’;

// Names and images
$app_name = “Map App”;
$app_url = “map_app”;

// Assumes application is at http://apps.facebook.com/app-url/
$app_image = “Application image URL”;
$invite_href = “invite.php?fb_force_mode=fbml”;

// Rename this as needed require_once ‘facebook.php’;
$facebook = new Facebook($api_key, $secret);
$facebook->require_frame();
$user = $facebook->require_login();

if(isset($_POST[“ids”])) {
  echo “<center>Thank you for inviting “.sizeof($_POST[“ids”]).” of your friends on <b><a href=\”http://apps.facebook.com/&#8221;.$app_url.”/\”>”.$app_name.”</a></b>.<br><br>\n”;
  echo “<h2><a href=\”http://apps.facebook.com/&#8221;.$app_url.”/\”>Click here to return to “.$app_name.”</a>.</h2></center>”;
} else {
  // Retrieve array of friends who’ve already added the app.
  $fql = ‘SELECT uid FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1=’.$user.’) AND is_app_user = 1′;
  $_friends = $facebook->api_client->fql_query($fql);

  // Extract the user ID’s returned in the FQL request into a new array.
  $friends = array();

  if (is_array($_friends) && count($_friends)) {
    foreach ($_friends as $friend) { $friends[] = $friend[‘uid’]; } }

  // Convert the array of friends into a comma-delimeted string.
  $friends = implode(‘,’, $friends);

  // Prepare the invitation text that all invited users will receive.
  $content = “<fb:name uid=\””.$user.”\” firstnameonly=\”true\” shownetwork=\”false\”/> has started using <a href=\”http://apps.facebook.com/&#8221;.$app_url.”/\”>”.$app_name.”</a> and thought it’s <u>so cool even you should try it out</u>!\n”.
             “<fb:req-choice url=\””.$facebook->get_add_url().”\” label=\”Add “.$app_name.” to your profile\”/>”;
?>
  <fb:request-form action=”<? echo $invite_href; ?>” method=”post” type=”<? echo $app_name; ?>” content=”<? echo htmlentities($content); ?>” image=”<? echo $app_image; ?>”>
    <fb:multi-friend-selector actiontext=”Here are your friends who don’t have <? echo $app_name; ?> yet. Invite whoever you want -it’s free!” exclude_ids=”<? echo $friends; ?>” />
  </fb:request-form>
<?
}
?>


>Here is the URL http://www.facebook.com/username/ where you can set the username for all your  pages  as well as for your account like:
http://facebook.com/


>Here are the steps to adding a left sidebar ad/button/image to your Facebook Page wall:
1. Click the “Edit Page” link on your Fan Page main page
2. Install the “Static FBML” Application from Facebook.

  • Look for the “More Applications” box at the bottom of the edit area.
  • After you search you should see the “Static FBML” application in the search results.
  • Click on the “Static FBML” link.

3. Add the Static FBML application from Facebook to your Fan Page

  •    Click the “Add to my Page” link on the Static FBML page.
  • After you click the “Add to my Page” link you may get a selection popup that asks which Facebook Page you want to add the application to. Just click the “Add to Page” button for the appropriate page.

4. Add content to the Static FBML application

  •    Now you need to get back to your Facebook Page that you just added the Static FBML application to and click the “Edit Page” link again. 
  • There should be a new box in the middle of the edit page
  • Click the “Edit” link.
  • Now you will see a very simple editing interface with “Box Title:” and “FBML:” fields.
  • The Box Title is just text, but the FBML field can take HTML or FBML.
  • Insert the your code into FBML field:
  • Click “Save Changes” at the bottom. 

5. Move the new FBML box to the Wall page

  •  Go back to your main Facebook Page tab. Then go to the “Boxes” tab. You should see your code 

Thats it.