Urgent

Signaler
Messages postés
9
Date d'inscription
mardi 25 novembre 2008
Statut
Membre
Dernière intervention
3 février 2010
-
Messages postés
9
Date d'inscription
mardi 25 novembre 2008
Statut
Membre
Dernière intervention
3 février 2010
-
Bonjour,j'ai ce code je veux le développer,
<?php
// Copyright 2007 Facebook Corp.  All Rights Reserved.
//
// Application: vtigerext
// File: 'index.php'
// This is a sample skeleton for your application.
//


require_once ('client/facebook.php');
require_once ('footprints/lib.php');
require_once ('footprints/config.php');
$appapikey = '346d25445286f66ccd8554b8651ba';
$appsecret = 'db387cd724ba0976c66c23bb07fdc';
//$api_client = 'e1e03ed48e429de03bb3c6ce3e38571c676017cf';
$facebook = new Facebook($appapikey,$appsecret);
echo "will login";
$facebook->require_frame();
echo "
will login";
$user_id = $facebook->require_login();


// Greet the currently logged-in user!
echo "Hello, <fb:name uid="$user_id" useyou="false" />!

";
// Print out at most 25 of the logged-in user's friends,
// using the friends.get API methodecho "Friends:";
$friends = $facebook->api_client->friends_get();
$friends = array_slice($friends, 0, 35);
foreach ($friends as $friend) {
echo "
$friend";
}
echo "

";


//$friendss = $facebook->api_client->friends_getLists();
//$friendss = array_slice($friendss, 0, 35);
//foreach ($friendss as $frienda) {
//echo "
$frienda";
//}
//echo "

";
/* We'll also echo some information that will
  help us see what's going on with the Facebook API: */
echo "Debug:" . print_r($facebook,true) . "

";


$secret = 'db387cd724ba6e96bcdc66c23bb07fdc'; // where 'Secret Key' is your application secret key
$args = array(
'[0]' => '510294193',
'[1]' => '532818011',
'[2]' => '533049905',
'[3]' => '549057766',
'[4]' => '556612139',
'[5]' => '558485118',
'[6]' => '611281384',
'[7]' => '625040573',
'[8]' => '661350584',
'[9]' => '685534055',
'[10]' => '713551881',
'[11]' => '722216751',
'[12]' => '729425682',
'[13]' => '766314872',
'[14]' => '1005157198',
'[15]' => '1009193635',
'[16]' => '1037961965',
'[17]' => '1038594549',
'[18]' => '1050000665',
'[19]' => '1077951589',
'[20]' => '1084830787',
'[21]' => '1085803441',
'[22]' => '1094220624',
'[23]' => '1101251229',
'[24]' => '1122530528',
'[25]' => '1126163560',
'[26]' => '1127701905',
'[27]' => '1140134956',
'[28]' => '1143142506',
'[29]' => '1143204878',
'[30]' => '1143516950',
'[31]' => '1152403925',
'[32]' => '1171493293',
'[33]' => '1181867259',
'[34]' => '1195952944',
'[35]' => '1208153788',
'[36]' => '1213780292',
'[37]' => '1244821447',
'[38]' => '1245967595',
'[39]' => '1246130950',
'[40]' => '1290212831',
'[41]' => '1306862045',
'[42]' => '1324373127',
'[43]' => '1325203270',
'[44]' => '1345513081',
'[45]' => '1350175525',
'[46]' => '1360902039',
'[47]' => '1383823148',

); // insert the actual arguments for your request in place of these example args
$request_str = '';
foreach ($args as $key => $value)
{
$request_str .= $key . '=' . $value;
}
$sig = $request_str . $secret;
$sig = md5($sig);




$ami = $facebook->api_client->friends_getLists('346d2546e2b8286f66ccd8554b8651ba','2.wlu19K3MKsDgZvvCjKA1IA__.86400.1233133200-1600947778',0,$sig,'1.0');
var_dump($ami);
 
echo $user;
echo $ami;
$int_id = foo_gen_id();
$str = foo_gen_pref();
$friends11 =$facebook->api_client->data_setUserPreference($int_id, $str);
unset($facebook);
echo "
$friends11";
$ami = $facebook->api_client->FacebookRestClient.friends_get();
var_dump($ami);
echo $ami;
$appcallbackurl = 'http://mon_site.com/callback.php';
 
try {
     if (!$facebook->api_client->users_isAppAdded()) {
          $facebook->redirect($facebook->get_add_url());
     }
} catch (Exception $ex) {
     $facebook->set_user(null, null);
     $facebook->redirect($appcallbackurl);
}
?>


Aidez moi s'il vous plait à le corriger et à développez.


MERCI.


 

2 réponses

Messages postés
46
Date d'inscription
vendredi 24 octobre 2008
Statut
Membre
Dernière intervention
27 janvier 2009

quand je vois ça : where 'Secret Key' is your application secret key
je me demande si tu ne ferais pas mieux de la masquer cette clé???

Je sais que ça ne t'aide pas dans ton problème, c'est juste une remarque...
Messages postés
9
Date d'inscription
mardi 25 novembre 2008
Statut
Membre
Dernière intervention
3 février 2010

ces clés sont fausses.merci