Mantissa
Mantissa

Reputation: 91

Querying Facebook Graph using object in the where clase?

Im trying to query the Facebook graph api to retrieve a specific list of photos. I have photo ids stored within an object. Is it possible to insert the object within the where clause of the FQL query and if so what is the syntax?

The query is:

"SELECT object_id, images FROM photo WHERE pid =' " + photos.photoId + "ORDER BY created DESC"

photos is an object containing the user_id and the photoId.

Thanks

Upvotes: 0

Views: 40

Answers (1)

Tsvi Tannin
Tsvi Tannin

Reputation: 407

Since FQL queries are strings you have to convert all of the PIDs in that object to a string such that you can use the in syntax.

An example of this would be

select uid1 from friend where uid2 in (4,5)

Upvotes: 0

Related Questions