Just wanted to know why my facebook app isnt working. installed everything correctly and getting these errors.: http://apps.facebook.com/memorizablefb/
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/a8400355/public_html/index.php on line 9 Code (markup): That basically means the same thing it would mean in a regular PHP script. The mysql result is not valid which means your mysql query probably failed. try printing the mysql query before it's executed and run it manually in your mysql database. Or try printing the error with mysql_error() when you execute the query. you can use something like this: $result = mysql_query($query) or die("an error occured: " . mysql_error()); Code (markup):
Obviously it's not working because it's broken. Also your website is under review by your hosting company so without you telling us what errors you're getting, we can't help you.
<?php require_once "facebook.php"; require_once "app.php"; $user_id = $facebook->require_login(); require_once "db.php"; $sql="select * from memorymeter where uid=".$user_id; $result=mysql_query($sql); $res=mysql_fetch_assoc($result); $record=$res['bestrecord']; $friends = $facebook->api_client->friends_get(); $user_details=$facebook->api_client->users_getInfo($friends, array('pic_square')); ?> <center> <? include_once "topbanner.php"; ?> </center> <?
Edit: $sql="select * from memorymeter where uid=".$user_id; $result=mysql_query($sql); PHP: To this: $sql = "SELECT * FROM `memorymeter` WHERE `uid` = '" . $user_id . "'"; $result = mysql_query($sql) or die(mysql_error()); PHP:
Well, now that just means you don't have a 'memorymeter' table in your database. Have you even created a database for this application yet?
Is that the FB app where you can see who viewed your profile? =) Shawn Drewry, CEO of DrewryNewsNetwork