I own a regional business directory and want to collect and add URLs of company Facebook Pages and Twitter pages by location (City and/or Zip code). What would be the best method to accomplish this task? Would using their API help? If so, how would I go about collecting this data (Company Page Name, URL, location)? Thank you.

1 Answer 1


The most accurate way would be to write your own spider to crawl facebook pages. When you visit a facebook page first determine if its a local business or not. Next determine its zip code. Based on the zip code you will get access to the local business info.

Now here is the catch. Facebook will not really allow you to spider their site. They will start giving your spider page not available errors. Where it makes it more complicated is that sometimes a page will be locked down. Facebook has spent a lot of time / effort getting people to invest in their platform by giving them data. If you were to scrape that data from FB / Yelp or others, they would be at a loss. It may also be against their TOS and I would be careful that they do not include some HoneyPot fake listings which can be used as decoys that if copied to 3rd party sites act as evidence of data being stolen or copied from facebook.

Your best bet for a directory is to buy the data. It gets very expensive. But if you had your own db of local business you could enrourage those business to update their profile and link to their facebook page. That OAuth connection tells facebook that the user has "allowed" the communication. For that you would need to use the Twitter / Facebook OAUTH Api's/

The reason the second approach is more mature is because you can adapt it and grow it. You can eventually add connects to other sites / services. Its the correct way to do something like this, but most expensive in data fees and dev.

  • Frank, Thanks for the information. Yes, I agree, the second approach is best. Do you know who sells that type of social media data? I have been asking existing listees to submit that info and have been including it but I want to speed the process up as far as populating Facebook and Twitter URLs. My db presently includes over 500,000 listings. How do I get this info via the Twitter/Facebook OAUTH Api's? Nov 28, 2012 at 15:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.