Vous êtes sur la page 1sur 5

1. GIFT Application manual.

Edit Config.php
<?php
// the facebook client library
include_once "facebook.php";
// Get these from http://developers.facebook.com
$api_key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxx';
$appsecret = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxx';
$appid = "xxxxxxxxxxxxxxxx";

$facebook = new Facebook(array(


'appId' => $appid,
'secret' => $appsecret,
'cookie' => true,));

$session = $facebook->getSession();

Highlight

Fill in with your :-

Apps Key.
Apps Secret .
Apps ID.

Copyright 2011 © www.fbappsprofits.com


2. GIFT Application manual.

Edit Index.php

include_once "config.php";
include "ads/ads04.php";

if(isset($_POST[ids])){
$message = "is inviting you to use <a href = \"http://apps.facebook.com/yourcanvasgepage/\">A Hug
Your Friend</a>!! Hug Now!";
$ids_list = implode(",",$_POST[ids]);
$facebook->api_client->notifications_send($ids_list,$message,'user_to_user');
echo "<br /><br />Thank you for inviting ".count($_POST[ids])." friends to A Hug Your Friend";
}

?>

<fb:request-form
action="http://apps.facebook.com/yourcanvasgepage/indexa.php"
method="POST"
type="A Hug For Friend"
content="A Hug For Friend!<?php echo htmlentities("<fb:req-choice url=\"http://apps.facebook.com/
yourcanvasgepage /\"label=\"Hug Someone!\"") ?>" >
<fb:multi-friend-selector showborder="false" actiontext="INVITE YOUR FRIEND TO A Hug For Friend!
">
</fb:request-form>

<?php
include "ads/ads02.php";
include "ads/ads03.php"; ?>

Highlight Change with your Canvas page URL.

Highlight Change with your Own Word suite to your apps topic.

Copyright 2011 © www.fbappsprofits.com


3. GIFT Application manual.

Edit Indexa.php

<form action="send.php" id="testForm" method="post">

<center>
<font size="5" color="#660066" face="Comic Sans MS, cursive"> Select Your Favourite Hug</font>
<br />
<table width=100% cellpadding=2 cellspacing=2>
<tr>
<td>
<P class=centerP><img src="http://www.yourdomainname.com/yourcanvasurl/images/1.jpg"
border="0" width="100" height="100"></P><P class=centerP><center><input type="radio" name="hug"
CHECKED value="1"><font size="2" >Best Friend Hug</font></center></P>

<br/><br />
<font size="5" color="#3333FF" face="Comic Sans MS, cursive"> Select Someone to Hug</font> <br
/>
<br />

<fb:friend-selector uid="$user" name="uid" idname="uid2"/>


<input class="inputbutton" style="cursor: pointer;" name="conv" value="Send My Hug!"
type="submit">
</form>
</center> <br /><br />

Highlight Change with your Canvas URL.

Highlight Change with your Own Word suite to your apps topic.

Copyright 2011 © www.fbappsprofits.com


4. GIFT Application manual.

Edit send.php

<?php

include_once 'config.php';
include "ads/ads03.php";

$hug = $_POST["hug"];

$message = "I Hug You";


$target = $_POST[uid2];
$name = "A Special Hug";
$name_href = 'http://apps.facebook.com/youcanvaspage/';
$caption = "You Have Received a hug from {*actor*}.";
$description = 'Reply This Hug Now click Link Below!';
$img_1 = 'http://www.yourdomainname.com/yourcanvasurl/images/'.$hug.'.jpg';
$img_1_href = 'http://apps.facebook.com/ yourcanvasgepage /';
$actionlinks_text = 'Reply Hug Now!';
$actionlinks_href = 'http://apps.facebook.com/yourcanvaspage/';

$attachment = array(
'id' => $target,
'message' => $message,
'name' => $name,
'caption' => $caption,
'link' => $name_href,
'description' => ''.$description.'',
'picture' => $img_1,
'actions' => array(array('name' => $actionlinks_text,
'link' => $actionlinks_href))
);

Highlight Change with your Canvas page URL.

Highlight Change with your Canvas URL.

Highlight Change with your Own Word suite to your apps topic.

Copyright 2011 © www.fbappsprofits.com


5. GIFT Application manual.

Facebook Developer

Fill up with your Canvas page URL & your Canvas URL.

Canvas Type select- FBML

Gift-Apps-Script.

Change with your file/folder name and upload into your hosting/server.

Thank You.

Copyright 2011 © www.fbappsprofits.com

Vous aimerez peut-être aussi