Talk:Demos

From Facebook Developer Wiki

Jump to: navigation, search

-- this app (Smiley) makes connections to a reported attack site. is this normal behavior?

We're working on getting this fixed. Thanks, Pete (563683308 11:25, 24 August 2009 (PDT))


Contents

[edit] Restaurants - Problem/Typo with SQL db setup

Just to mention that there is a typo in the mysqldump_advanced_demo SQL that is given in the TAR.GZ file.

The file has a CREATE DB command which tries to create a db called rest_test when the README states to create a db called restaurant_demo

--61109816 08:05, 11 March 2009 (PDT)





  • Footprints: I haen't tried it out
   * Restaurants: 

Some quirks. When I rate a restaurant, index.php?action=rate is called, but I get a blank page.

After reload I get a canvas-page with the message "invalid restaurant id".

I delete ?action=rate from the call and reload, and get back to the main page of the application. The rating is stored allright.

   * Who's Showing Up: I press See My Plans, and get: "You have no plans yet. Make some!"

So I press Make some! and get back to http://apps.facebook.com/(my canvas)//index.php.

I am guessing there should have been a link to editplans.php - maybe - so I call editplans.php directly. This produces an fb-error, "No business page specified." I give up.



How do you folks feel about adding VB sample code for desktop applications? I'm working on some now and the info is hard to come by. -Rick- rhenderson@wlu.ca


These apps should probably sanitize the data going in to the database, since lots of people that don't know about proper database security are going to be using these apps to base theirs off of. --1470030056 23:38, 16 December 2007 (PST)



$ wget 'http://developers.facebook.com/clientlibs/facebook-platform.tar.gz' $ tar xvf facebook-platform.tar.gz $ cp facebook-platform/client/facebook*.php MY_DIR

<?php// Copyright 2007 Facebook Corp. All Rights Reserved. // // Application: Testing// File: 'index.php' // This is a sample skeleton for your application. // require_once 'facebook.php';$appapikey = 'ed43367163fa171ceba96ec2820746e9';$appsecret = 'af89f6ba494b1c9c9717c1d5e40a7702';$facebook = new Facebook($appapikey, $appsecret);$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, 25);foreach ($friends as $friend) { echo "
$friend";}echo "

";

[edit] Doesn't work under PHP4...

Also a heads up for anyone on PHP4.

The current PHP4 client library uses a couple of PHP5 functions in some of it's methods - so fails to work at all.

You can fix this by removing the "public" or "private" from any functions that have them.

Plus Footprints uses the "batch" methods - which have not been ported from the PHP5 client library to the PHP4 one either.

If anyone in Facebook reads this - a fix would probably save a lot of people a lot of time...

-(

-- Hello, I had the same problem. I solved it by adding the following line into the root .htaccess file.

AddType x-mapp-php5 .php 

HTH

[edit] footsteps are not footsteps any more

You should know that... they rename it for something else... and i can't find they code :(--648730399 12:24, 30 July 2008 (PDT)

[edit] How do i get a demo of the footprints?

I can't get the sample code for the footprint app working I'd like to see working demo... anyone has it?

If you're trying it out on the new profile, you need to download the version with the updated client library: http://svn.facebook.com/svnroot/platform/clients/packages/facebook-platform.tar.gz It's available in the Developer application under PHP 5 New Client Library (Note: The version of the lib at the Download Sample Application link points to the older library -- this should be fixed soon). -- Pete User:563683308

Thanks. I downloaded the new library, but the friend search list still wouldn't show up...

[edit] Footprint demo broken link

The link to the footprint demo points to a different application.
Where has the real demo gone?? 601985102 04:16, 20 August 2008 (PDT)

Can someone help me ?, i have a problem in the demo application, this give me the next error

Fatal error: Uncaught exception 'FacebookRestClientException' with message 'Session key invalid or no longer valid' in /home/oximtecco/domains/oximtec.com/public_html/therunaround/facebookapi_php5_restlib.php:1674 Stack trace: #0 /home/oximtecco/domains/oximtec.com/public_html/therunaround/facebookapi_php5_restlib.php(355): FacebookRestClient->call_method('facebook.friend...', Array) #1 /home/oximtecco/domains/oximtec.com/public_html/therunaround/prueba2.php(25): FacebookRestClient->friends_get() #2 {main} thrown in /home/oximtecco/domains/oximtec.com/public_html/therunaround/facebookapi_php5_restlib.php on line 1674

This error occurs when i log out my facebook account, i have this code:

 <?php 
 	 require_once('facebook.php');

$appapikey = '3ddea1a77cf983c678fd0ce852fa747c'; $appsecret = 'f4ab8273a9170a2ea29b36822a1bcc25';

$facebook = new Facebook($appapikey, $appsecret); $friends = $facebook->api_client->friends_get(); $friends = array_slice($friends, 0, 25); $user_id = $facebook->require_login(); echo "Usuario: ".$user_id; $x = 0; $limit_row = 4; foreach ($friends as $friend) { echo "<fb:profile-pic uid='$friend' facebook-logo='true' size='square'></fb:profile-pic>"; echo "<fb:name useyou='false' uid='$friend'></fb:name>"; if($x == $limit_row) { echo "
"; $x = 0; }

$x=$x+1; }

 ?>
I'll be grateful if someone help me

[edit] Smiley doesn't work

well, I can't get smiley to install at all

Fatal error: Uncaught exception 'FacebookRestClientException' with message 'Setting info failed. Check the formatting of your info fields.' in /my_server/client/facebookapi_php5_restlib.php:1915 Stack trace: #0 /my_server/client/facebookapi_php5_restlib.php(874)...

does anybody know a solution?

Lot's of problems with the other demos (I tried restaurants and footprints). The problems were mentioned before so I won't repeat them.

We're working on fixing Smiley so it accurately represents the current state of Facebook Connect. We'll have it out soon, but I can't provide an exact date. Sorry and thanks for your patience. Pete (563683308 11:19, 4 August 2009 (PDT))
reference