beginning-facebook-games-app-development
beginning-facebook-games-app-development copied to clipboard
Issue with Chapter 10 puzzle game
Only the top part of the form shows, with the Welcome message and facebook login button.
Firebug shows:
SyntaxError: unterminated string literal
var imagePath = '
If you look at it, imagePath contains a bunch of html code among that code it says
Notice: Undefined variable: src in C:\Users.......
Since I have never really programmed using PHP I am not sure where to look I assume it has something to do with the $src = under the @photos stuff.
I replaced the code I typed from the book with what is in this repository and it gives the same error.
I just took a look at that chapters example; there may be a change in the API response that's causing this, but the quotes can get a bit funky with PHP...I'll take a deeper look and get an update.
Thanks for letting me know!
Just a thought, perhaps it has something to do with an invalid access token?
Since I have not worked much with PHP it is just a guess that maybe it is exiting before it sets the $image and $src, if it falls to the catch while doing the $basic = $facebook->api('/me');
In the catch it has exit();
I added the sharedSession and trustForwarded, and copied the lates sdk from the facebook repo.
Also, THANKS for the quick response. I am really enjoying the book so far.