+ Post New Thread
Results 1 to 15 of 15
Web Development Thread, Anyone made a Facebook App? in Coding and Web Development; My brother came up with a little plan for a X Factor voting app and Im working on the coding ...
  1. #1

    SimpleSi's Avatar
    Join Date
    Jun 2005
    Location
    Lancashire
    Posts
    5,720
    Thank Post
    1,451
    Thanked 580 Times in 434 Posts
    Rep Power
    165

    Anyone made a Facebook App?

    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

  2. #2

    webman's Avatar
    Join Date
    Nov 2005
    Location
    North East England
    Posts
    8,374
    Thank Post
    625
    Thanked 951 Times in 653 Posts
    Blog Entries
    2
    Rep Power
    318
    I did start on one but I don't have access to any of the code at the moment I'm afraid. What's your query?

  3. #3

    SimpleSi's Avatar
    Join Date
    Jun 2005
    Location
    Lancashire
    Posts
    5,720
    Thank Post
    1,451
    Thanked 580 Times in 434 Posts
    Rep Power
    165
    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 :-
    Code:
    <?php
    // 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 "<p>Hello, <fb:name uid=\"$user_id\" useyou=\"false\" />!</p>";
    
    echo "</p>";
    The <fb:name .... /> does nothing - no error just no output at all
    This is the sample code that facebook itself offers when developing apps

    regards

    Simon

  4. #4
    Dodgex1's Avatar
    Join Date
    Jun 2007
    Location
    Manchester
    Posts
    122
    Thank Post
    11
    Thanked 32 Times in 20 Posts
    Rep Power
    19
    I had a go at one, It might be not be much help, I used this when I was playing about I can has Facebook - .net magazine

  5. #5

    Edu-IT's Avatar
    Join Date
    Nov 2007
    Posts
    6,875
    Thank Post
    393
    Thanked 581 Times in 532 Posts
    Rep Power
    173
    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.

  6. #6
    mossj's Avatar
    Join Date
    Dec 2008
    Location
    Leicester
    Posts
    1,466
    Thank Post
    157
    Thanked 189 Times in 174 Posts
    Rep Power
    51
    Theres an example app on facebook (snowglobe or snowman) anyway it's basicly a hello world app.

    could well be worth a look.

  7. #7

    SimpleSi's Avatar
    Join Date
    Jun 2005
    Location
    Lancashire
    Posts
    5,720
    Thank Post
    1,451
    Thanked 580 Times in 434 Posts
    Rep Power
    165
    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

    Code:
    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

  8. #8

    SimpleSi's Avatar
    Join Date
    Jun 2005
    Location
    Lancashire
    Posts
    5,720
    Thank Post
    1,451
    Thanked 580 Times in 434 Posts
    Rep Power
    165

    PHP workflow

    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

  9. #9

    Join Date
    Jan 2007
    Location
    Lowestoft, Suffolk
    Posts
    84
    Thank Post
    6
    Thanked 4 Times in 4 Posts
    Rep Power
    15
    I suppose the obvious solution would be to try to optimise the script to reduce the 30 second delay. What's the cause of the delay?

  10. #10

    SimpleSi's Avatar
    Join Date
    Jun 2005
    Location
    Lancashire
    Posts
    5,720
    Thank Post
    1,451
    Thanked 580 Times in 434 Posts
    Rep Power
    165
    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

  11. #11

    Join Date
    Jan 2007
    Location
    Lowestoft, Suffolk
    Posts
    84
    Thank Post
    6
    Thanked 4 Times in 4 Posts
    Rep Power
    15
    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.

  12. Thanks to PaulBM from:

    SimpleSi (29th November 2009)

  13. #12

    SimpleSi's Avatar
    Join Date
    Jun 2005
    Location
    Lancashire
    Posts
    5,720
    Thank Post
    1,451
    Thanked 580 Times in 434 Posts
    Rep Power
    165
    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 )

    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

    regards

    Simon

  14. #13

    Join Date
    Jan 2007
    Location
    Lowestoft, Suffolk
    Posts
    84
    Thank Post
    6
    Thanked 4 Times in 4 Posts
    Rep Power
    15
    Excellent news. We should have guessed IE would be the cause.

    By the way, Firebug is a Firefox addon, I didn't make myself clear in the previous post. It's a vital addon for web developers everywhere.

    Firebug - Web Development Evolved

    Here's a link to the Net tab... Firebug and Network Monitoring


    I'd love to test your app, only trouble is I'd need to be paid serious money to watch X-Factor.

  15. #14

    SimpleSi's Avatar
    Join Date
    Jun 2005
    Location
    Lancashire
    Posts
    5,720
    Thank Post
    1,451
    Thanked 580 Times in 434 Posts
    Rep Power
    165
    Thanks - I was getting confused between FirePHP and FireBug

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

    regards

    Simon

  16. #15
    ahuxham's Avatar
    Join Date
    Apr 2008
    Posts
    1,122
    Thank Post
    76
    Thanked 138 Times in 109 Posts
    Rep Power
    30
    Quote Originally Posted by SimpleSi View Post
    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

SHARE:
+ Post New Thread

Similar Threads

  1. Thats made my night..........
    By IanT in forum General Chat
    Replies: 14
    Last Post: 21st August 2009, 08:26 PM
  2. Have I made a booboo?
    By laserblazer in forum Windows Server 2000/2003
    Replies: 8
    Last Post: 31st January 2009, 11:45 PM
  3. Made me chuckle...
    By Ric_ in forum Jokes/Interweb Things
    Replies: 4
    Last Post: 8th March 2007, 02:07 PM
  4. App to Web App
    By Quackers in forum Web Development
    Replies: 8
    Last Post: 28th February 2007, 01:32 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •