Jump to content

Recommended Posts

Posted

My brother came up with a little plan for a X Factor voting app and Im working on the coding but wondered if anyone else had made one and was willing to answer a few questions about using FBML calls in an Iframe app.

 

regards

 

 

Simon

Posted

Like I say - no FB javascript calls seem to do anything at all.

 

I've worked around it (main problem was getting app to ask for publishing permission) - all examples are using fb: type calls (which do nothing and mean nothing to me :) )

 

I'd just like to find out what I'm doing wrong :)

 

For example of code that does nothing :-

// Copyright 2007 Facebook Corp.  All Rights Reserved. 
// 
// Application: The W Factor - Rate the X factor contestants
// File: 'index.php' 
//   This is a sample skeleton for your application. 
// 

require_once 'facebook.php';

$appapikey = 'xxxx';
$appsecret = 'yyy';
$facebook = new Facebook($appapikey, $appsecret);
$user_id = $facebook->require_login();

// Greet the currently logged-in user!
echo "
Hello, !";

echo "";

The does nothing - no error just no output at all

This is the sample code that facebook itself offers when developing apps :confused:

 

regards

 

Simon

Posted
I know somebody who has and I can put you in touch with them later today if you like? Drop me your email address if you're interested and if you have MSN, they're always on that.
Posted

Thanks for offers but I think I've managed to nail the little sucker :)

 

If your really really bored and got absolutely nothing else (and I mean nothing else :) to do then visit

 

http://apps.fcaebook.com/simplesi

delib misspull to stop spiders

 

and see if if works for you - reports welcome

 

it should post a barchart to your status - to remove it just goto your profile and you can remove it from their.

 

I'd just like to say it was my brother's idea and I just did the programming!

 

regards

 

Simon

Posted

I'm having a slight problem with a delay now.

 

The app displays a voting table and has a vote button to submit the form. I then do some calculations and work out totals.

 

I then get PHP to make a bar chart of the results and then post the information onto users wall.

 

The problem is that there can be a long delay (30 secs) with last step so I put another form in to pause the workflow and output the results onto screen and then added another button to go back to view wall - this submit button then did the posting of results before redirecting to home page.

 

Problem is that some users don't click the button - they directly click their own Home button so the status update doesn't happen.

 

Basically I'm fighting HTML/PHP workflow that wants to process whole of script before outputing any info onto webpage (and if I output info I can't of course do a Header: Location redirect :( )

 

Anyone had this sort of issue and got any workarounds :)

 

regards

 

Simon

Posted

I'm trying to insert some echo time statements to see where the delays are - but the very fact of inserting them seems to have speeded the app up :)

 

I wonder if its just random load on either my server (which is just a shared one hosted on one.com) or facebook

regards

 

Simon

Posted
Is the Net tab in Firebug any good to you to spot the delay? It gives timings of all the requests for the page. It may show if facebook is the cause.
  • Thanks 1
Posted

I looked to installing firebug but it looks too complex for me with all the server side that's needed :(

 

My brother (Project leader :) ) came up with a little bit of Javascript code that displays a "wait while we calculate your scores" box which keeps the users happy while the processing is going on :)

 

The delays seemed to def be when I use facebook api to update users status - it can vary quite a bit in how long this takes (1 - 20 secs :eek:)

 

My main problem turned out to be when I asked someone new to test it and they used IE :(

 

Practically nothing worked - main problem being that IE wouldn't automatically hold facebook parameters (user id etc) across subsequent redirects to other php files :(

 

Ended up having to collect all params on first file and re-add them as url parameters on subsequent redirects.

 

Only found this out at about 2pm Sat but managed to get it working before show start!

 

Now I've to start and implement the app keeping track of everyones score and handing out the running totals after each user has voted.

 

We are up to 26 users - at least two of these people aren't actually friends or family :p

 

regards

 

Simon

Posted
Thanks - I was getting confused between FirePHP and FireBug :)

 

DIdn't know FireBug could profile times - ta very much :)

 

regards

 

Simon

 

Google Chrome has a built-in inspector that catalogues times, including documents, stylesheets, server response, scripts and processing, invaluable tool to have

 

Right click on page > Inspect Element > Resources and its all there, just refresh and new times are shown.

 

Edugeek reply to post is showing 541ms Documents, 324ms Images, 315ms Scripts, 139ms Other

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...