When Facebook drives traffic to an application, it often append &ref=whatever to the query string. This is useful for figuring out which integration points
&ref=whatever
It means 'Top Search' (if you enter a query into the top, and then click on something, it will append ref=ts
ref=ts