-1
if($user_gender == "male")
{
$fql_query_result = file_get_contents("https://graph.facebook.com/fql?q=SELECT+uid%2C+name+FROM+user+where+uid+IN+(SELECT%20uid2%20FROM%20friend%20WHERE%20uid1%20=%20me())%20and%20sex='female'ORDER%20BY%20rand%20()%20LIMIT%201&access_token=".$access_token);
}
else
{
$fql_query_result = file_get_contents("https://graph.facebook.com/fql?q=SELECT+uid%2C+name+FROM+user+where+uid+IN+(SELECT%20uid2%20FROM%20friend%20WHERE%20uid1%20=%20me())%20and%20sex='male'ORDER%20BY%20rand%20()%20LIMIT%201&access_token=".$access_token);
}
在图形API浏览器画面的显示显示随机性别(性别)朋友的个人资料使用FQL
{
"data": [
{
"uid": 100001242402868,
"name": "Don Omer"
}
]
}
如何从上面的数据中提取UID,这样我们可以显示他/她的个人资料图片
$friend_pic = imagecreatefromjpeg("http://graph.facebook.com/".$fql_query_result['uid']."/picture?type=normal");
我正在尝试创建一个名为“Who Will Marry Me”的应用程序。
在此先感谢
复制/继续[显示男性用户(异性)女性朋友的个人资料图片]](http://facebook.stackoverflow.com/questions/12166598/display-profile-pic-of-female-friend-for -male-user-opposite-sex) – CBroe
我删除了我以前的问题... –
你的问题是什么?你为什么不使用SDK? – Igy