Monthly Archives: August 2010

Facebook Application Setup

Making web applications and desktop applications are something like cooking food. To cook a delicious food is not always necessary when we are learners. To cook foods the first thing we need is to know the fundamental tools we need. Then we might need a setup to make the food eatable. Then light up your burner and start cooking. The taste is yours!!!

Here I am going to discuss about basic facebook application setup on Facebook Platform.

Types of facebook application?

There are basically two types of applications on FB.
1. iFrame
2. FBML

How facebook application runs on facebook platform?

iFramw

iFrame

another form is,

fbml

fbml

Go to Account -> Application setting

I assume that you have a developer account. If not, follow the necessary steps to make one.

Then choose Developer from the menu and select  + Set Up New Application. Here you’ll be prompt to name your application. Give a name and choose Agree.

Now, you’ll see something like this. These are the basic information of your application.

Essential info

Essential info

Now select the canvas tab. Remember this is the crucial part of your application. Canvas page URL, is the address of your application on Facebook Platform. Canvas Callback URL, where application is hosted.

canvas url

canvas url

Canvas Setting, here we are to develop a iFrame application. So, choose iFrame from the option. Choose other options as you need.

Save settings and TADAAAA!!!!!!!!!!!! This is enough for a simple application to go on.

Location API on Aloashbei Platform

To work with Aloahbei platform, first configure the .wsdl file for LBS which is given on the Aloashbei site. Or you can download it from here.

index.php

class LBSRequest {
 public $msisdn;
 function  __construct($num) {
 $this->msisdn = $num;
 }
 public $registrationID = "******";
 public $password= "******";
}

class GPInit {
 public $LBSRequest;
}

if(isset ($_POST['number'])) {
 $GPInit = new GPInit();
 $GPInit->LBSRequest = new LBSRequest("88".$_POST['number']);
 $result = $soap->requestLocation($GPInit);
}

Download full code

VirtualBox full screen problem for ubuntu

start ubuntu on Virtualbox. go to terminal and type
cd /media/
sudo sh ./VBOXADDITIONS_3.2.6_63112/VBoxLinuxAdditions-x86.run

wait for the process to complete.
shutdown ubuntu and restart VirtualBox.
when ubuntu is started press command+F to full screen and command+L to get it back.

Send SMS with GrameenPhone API and PHP

To work with Aloahbei platform, first edit the .wsdl file for SMS which is given on the Aloashbei site. Or you can download it from here.

First, make a config.php file.

$soap = new SoapClient("http://service.onnobela.com/sms.wsdl");

$var['registrationID'] = "******";
$var['password'] = "****";
$var['sourceMsisdn'] = '88017********';
$var['smsPort'] = 7424;
$var['msgType'] = 4;
$var['charge'] = 0.00;
$var['chargedParty'] = '88017********';
$var['contentArea'] = 'gpgp_psms';

Now, make the main index.php file put the number and message into the $var array and call sendSMS api.

$var['destinationMsisdn'] = '88'.$_POST['number'];
$var['msgContent'] = $_POST['msg'];

$result = $soap->sendSMS( array ("SendSMSRequest" => $var) );

Download full code