Wednesday, September 8, 2010

How to Insert “Add Profile Tab” Buttons In Facebook Application

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 Java Script API for Connect-


FB.Connect.showProfileTabDialog(callback);


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).


Article Link-

http://thefacebookjournal.com/2010/04/08/how-to-insert-add-profile-tab-buttons/

Friday, September 3, 2010

cool-php-captcha

Example

This project provides the SimpleCaptcha class.
Basic example:
session_start();
$captcha = new SimpleCaptcha();
// Change configuration...
//$captcha->wordsFile = null;           // Disable dictionary words
//$captcha->wordsFile = 'words/es.txt'; // Enable spanish words
//$captcha->session_var = 'secretword'; // Change session variable
$captcha->CreateImage();
... will output:

You can validate the php captcha with:
if (strtolower(trim($_REQUEST['captcha'])) != $_SESSION['captcha']) {
    return "Invalid captcha";
}


More examples

Background and foreground colors, dictionary words, non-dictionary random words, blur, shadows, JPEG and PNG support:

The images are similar to google captchas.


link: http://code.google.com/p/cool-php-captcha/

Friday, August 13, 2010

Facebook’s Stream.Publish method on browsers with popup blockers



How to use Facebook’s Stream.Publish method on browsers with popup blockers. See a demo.

What is the problem?

Recently many Facebook developers have been frustrated by popup blockers preventing the Stream Publish dialogue box from being displayed. If a user hasn’t logged in and authorised the application, dialogue boxes are shown in a popup window instead of an iframe. That’s fine for some visitors, but for those who have a popup blocker enabled, it means that they won’t see the dialogue box and therefore can’t publish a post into the stream.
The Stream Publish dialogue being displayed in an iframe.
The Stream Publish dialogue being displayed in an iframe.
The Stream Publish dialogue being displayed in a popup window. Popup blockers will prevent this from opening.
The Stream Publish dialogue being displayed in a popup window. Popup blockers will prevent this from opening.



URL: http://labs.thesedays.com/2010/08/11/publishing-facebook-stories/