In Iran, Facebook has filtered by government for (at least) 3 years; so the only way to gaining access to Facebook is by proxy or VPN. In that way IP address that appears to websites is from another country. My question is if no one can access to Facebook directly from Iran, how it can possible that Facebook is rank 6 in this country(http://www.alexa.com/topsites/countries/IR)? In other words, how Alexa can find out my country if I'm using proxy or VPN?
As far as I know, Alexa collects a lot of data from their toolbar or other client-side plugins. This way, the users in Iran are telling them when they are accessing Facebook (and they do not need to have Facebook's cooperation to get to the stats). Kind of like the TV ratings, which are also not measured by what actually happens on the transmission channel (would be tough to do with broadcasts anyway), but by polling a (small, but hopefully significant) user base that allows themselves to be measured.
This also explains why they have (or at least present) other demographic data like your age, gender, and education status, which really cannot be derived from your IP address.