Thursday, June 11, 2009

How to connect With facebook API in few steps:
There 3 different way to connect with facebook API. This blog will help you to connect with Facebook API. The steps starts with:

Create Facebook Application following these links
facebook_developers


CLICK Set Up New Application
Write Application Name: YOUR APPLICATION NAME say test
Then you will receive API KEY ,APPLICATION ID,SECRET along with other information.
Please note down these three values.
Then click on AUTHENTICATION tab you will get Post-Authorise Callback URL and Post-Remove Callback URL Please insert URL of the site hosting your application like WWW.example.com then save it
You need to provide connect URL . Click on Connect tab and you will find Connect URL.Here you need to provide you complete url of the page like www.example.com/mypage/
You are done with application registration on facebook
Now in your APPLICATIOn PAGE you will find Download the Client Library section
Download Client Library from this link
Now you will be available with facebook API
Please check the link below to connect with facebook

CLICK HERE

this video will tell you to authenticate your application with facebook application
After authenticating from about video please follow these steps
Create some file name say index.php

$api_key = 'XXXXXXXXXXXXXXXXXXXXXX';//put your application API KEY
$secret = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXX'; //PUT YOUR application Secret
require_once 'facebook.php';
$facebook = new Facebook($api_key, $secret);
$user = $facebook->require_login();
Echo $user;


You are successfulled logged in for facebook. REMEBER you should have all client library in the same folder say facebook_connect
Now you can get all facebook api call by

$facebook->api_client->.......

You can get all api in the following link
TEST API

cheers
GET knowledge and Share Knowledge