You need to provide the query as a JSON Object, you were missing the object notation ({...}
) and a comma between queries.
This works:
{"query1": "SELECT actor_id, message FROM stream WHERE filter_key IN (SELECT filter_key FROM stream_filter WHERE uid = me()) AND actor_id IN (SELECT uid2 FROM friend WHERE uid1 = me())",
"query2":"SELECT uid, name FROM user WHERE uid IN (SELECT actor_id FROM #query1)"}