我正在开发一个 Facebook 应用程序,我在这里有这个查询用户 ID 和其他信息的代码:
$users = $facebook->api(array(
'method' => 'fql.query',
'query' => "SELECT uid, last_name, pic_big"
+ " FROM user WHERE uid IN ("
+ " SELECT uid"
+ " FROM page_fan"
+ " WHERE page_id='411133928921438'"
+ " AND uid IN ("
+ " SELECT uid2 FROM friend WHERE uid1 = me()"
+ " )"
+ ")"
));
我需要将用户 ID 存储在一个数组中,这样我就可以只向生成的数组中的用户发送邀请。
function newInvite(){
var user_ids = ["1368246891", "1206927311", "1149862205"];
FB.ui({
'method' : 'apprequests',
'message': 'There goes the message for Penelope App users to invite their friends',
'to' : user_ids,
});
}
user_ids 必须在包含从 fql 查询生成的用户 ID 的数组中...