/    Sign up×
Community /Pin to ProfileBookmark

Facebook fql query pass it to javascript array

i am developing a facebook application and i have this code here which queries the user id and other information:

[CODE] $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()
))”));[/CODE]

I need to store the user id in an array so i can send invitation only to the users in the array generated.

[CODE] 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,
});
}[/CODE]

THe user_ids must be the array which holds the user id genrated from the fql query… Help me with this…

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @Albana_12 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...