Could any facebook users quickly help me out?

Associate
Joined
20 Jul 2007
Posts
1,364
As part of a project i'm doing for university I had to create a facebook application, its very primitve at the moment and needs a little testing.

Essentially the problem i'm having is that some users have an error when starting the application. It's an error i personally haven't been able to recreate. So if anyone could try out the application briefly i'd really appreciate any feedback and help trying to iron out this issue.

Unfortunately a facebook account is required, but if you've had one and are willing to help please go ahead. Furthermore,if the application works could you play the game for 5 images (you should be able to see what i mean), thats when it saves.
http://apps.facebook.com/sketchguess

Thanks very much!
 
Last edited:
Doesn't load for me. It lets me add the app to my page, but then when I click on the app it just freezes :(

2gsocb9.jpg
 
Can anyone see a problem with the following code ?
Code:
if(session.isNew())
            {
                    session.setMaxInactiveInterval(1200);


                    session.setAttribute("isAdmin",dba.isAdmin(userID));
                    gameSession = new GameSession();



                    gameSession.setUpChoiceVector();
                    gameSession.setNewImage(true);

                    gameSession.setTotalPoints(dba.getPoints(userID));
                    gameSession.setImageGroupNeeded(true);
                    gameSession.resetImagesUsed();

                    session.setAttribute("userID", userID);
                    session.setAttribute("staticUserID", userID);
                    session.setAttribute("loggedInUserID", userID);


                    request.setAttribute("totalPoints", gameSession.getTotalPoints());
                    request.setAttribute("reset", false);
                    log("------------------------------------------------------------------------------------");
                    log("created a new session");
                    String[] played = splitString(dba.playedBefore(userID));

                    session.setAttribute("gameSession", gameSession);
                    if(played[0].equals("true"))
                        {
                          gameSession.setPlayed(Integer.parseInt(played[1]))  ;
                          request.setAttribute("played", gameSession.getPlayed());
                        }
                    else{

                        dba.addPlayer(userID, 0, 0, 1);
                        log("this is the users first game");
                        request.setAttribute("played", 0);
                        gameSession.setTotalPoints(0);
                        gameSession.setPlayed(0)  ;

                    }


                }

            gameSession =((GameSession)session.getAttribute("gameSession"));;



            ImageTable images;
            PastGame pastGame;
            Vector<ImageTable> imageVector;


        boolean imageGroupNeeded;

        try
        {
            imageGroupNeeded =gameSession.getImageGroupNeeded();

        }
        catch(NullPointerException e)
        {

            imageGroupNeeded = true;
            log("Failed at image Group",e);


        }

With new users it throws "imageGroupNeeded" returns null, which it shouldn't!
 
I'm just getting a blank page on FF 3.5.2
Could be something to do with security settings at work I guess

Ok I am getting this error:

java.lang.NullPointerException
org.myfacebookapp.MainPageServlet.getFacebookInfo(MainPageServlet.java:207)
org.myfacebookapp.MainPageServlet.doGet(MainPageServlet.java:57)
javax.servlet.http.HttpServlet.service(HttpServlet.java:627)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
 
Nah if it worked for mr.sly then its something to do with with the session not having the required data..... i just can't work out why. Thanks guys.

Hopefully fixed something else with my playing around :\ Any advice ?
 
Last edited:
Doesn't load for me. That's with FF 3.5.2

Maybe post the code for your getImageGroupNeeded() method.

The codes just a very simple accessor and mutator that is within the "gameSession". Other code that works the exact same way works perfectly, so I doubt that's an issue.

Code:
public boolean getImageGroupNeeded()
{
	return imageGroupNeeded;
}

public void setImageGroupNeeded(boolean value)
{
	imageGroupNeeded = value;
}

Strangely it's not working for me on Firefox but OK on Chrome.
This may be because you played on firefox first, it added you to the database then delted the session you had on the server. When you started up with chrome it created a new session but accessed your details from the database (e.g. you were no longer a "first time" player). This problem only happens to people the first time a session is made for some reason :confused:

Any further input would be greatly appreciated! It's very hard to debug :(

It worked for me aswell and i am in chrome 2.0something, and what mean uni makes you do work over the summer!!
It's paid ;)
 
Well I don't seem to have had any errors thrown by new users since I last re-started. Maybe its working...maybe its just been lucky!
Thanks for everyone who's helped out!
 
Back
Top Bottom