Micromessage filtering examples for Facebook

About

Filter Facebook feeds according to message language and/or message/user location.

Feeds from Facebook Graph API

Get a set of posts from Facebook (through a search for instance):
curl "http://graph.facebook.com/search?q=phone&type=post&limit=10" > posts.json

Filter according to message language (only messages written in english or arabic):

curl -E semiocast-api.pem:PASSWORD -d languages=ar,en --data-urlencode data@posts.json https://api.semiocast.com/1/filter/facebook.json
[{"id":"1321463701_133457140006555","language":{"script_code":"arab","language_code":"ar"}}, {"id":"524729285_127046587335054","language":{"script_code":"latn","language_code":"en"}}]

User profiles from Facebook Graph API

Get a list of profiles thanks to a list of ids:

curl "https://graph.facebook.com/?ids=arjun,vernal" > profiles.json
or thanks to your friend list:
curl "https://graph.facebook.com/me/friends" > profiles.json

If you want only profiles from a specific location, like United States:

curl -E semiocast-api.pem:PASSWORD -d locations=US --data-urlencode data@profiles.json https://api.semiocast.com/1/filter/facebook.json
[{"id":"7901103","location":{"country_code":"US","city_name":"San Francisco"}}]
Filtering according to city name will be added later.