Developers: Here’s How You Access #Hashtags in Your Apps

I showed earlier tonight a way you can access on Facebook.com the stream for any particular hashtag without having to have a link to get to it. I mentioned Facebook would likely release an API for this. Being the idiot that I am I neglected the fact that Facebook already has a search API, and you can start using it right now.

Anyone, developers or not, can do this right now. Go to https://graph.facebook.com/search – add to it the URI variable q, specify a query (in this case your hashtag keyword prefaced by %23, the URI-encoded version of the # sign), and they add “type=post” to the URI string. In laymans terms, here is how it looks:

https://graph.facebook.com/search?q=%23hashtag&type=post

Just take the above query, put it in your browser (or send it in your app via a GET request), and it will return a JSON-encoded string you can parse and use in your apps. For the non-developers out there, that means there will be a bunch of {‘s and }’s and [‘s and ]’s with the list of all the public posts for that particular hashtag. It’s really simple!

The above example uses the hashtag #hashtag – to change it to something else, just replace “hashtag” with your keyword of choice. This one will do #fail:

https://graph.facebook.com/search?q=%23fail&type=post

Try it yourself and let me know if you see any quirks. So start coding my hacker friends! (and start learning if you’re not!)

Published by

jessestay

Jesse Stay has been a pioneer in the space of social media marketing since before it was called "social media marketing". Originally a software developer, Jesse built a tool called SocialToo.com which helped brands like Pepsi, Brittany Spears, and MC Hammer grow their social media presence, and before he knew it brands were coming to him for help to grow their presence in very unique ways. His tool was featured on almost every tech blog and even mainstream news sites like New York Times, Techcrunch, and Mashable. Jesse also spent a brief period working FOR Facebook, Inc., helping them to build out their documentation to help companies integrate Facebook Connect into their websites and mobile apps. Jesse took his skills and helped the LDS Church kick off most of its social media programs. While there he helped launch the award-winning "I'm a Mormon" marketing campaign with global reach worldwide in the millions of views and followers. Jesse established new global programs at the Church to further grow its reach amongst both members and non-members of the Church, working with every department of the Church, also including entities like the Mormon Tabernacle Choir and Brigham Young University. He also helped the Church navigate its voice and presence during the Mitt Romney Presidential campaign due to the significant attention the Church was getting at the time. He established the social media advertising techniques and strategies employed at Deseret Digital Media growing over 20 million fans across their news properties in just 6 months, and was featured on AdWeek for his success. As founder and Principal of Stay N Alive, Jesse has developed very unique techniques in social media advertising to help organizations grow presences, within months on minimal budgets, into hundreds of thousands of highly relevant and engaging fans and followers. He designed and teaches social media advertising at LDS Business College. He has helped grow sales, and has a belief that yes, you CAN measure social! Jesse has been featured as one of 10 entrepreneurs to follow on Twitter (next to Biz Stone and Ev Williams, founders of Twitter) by Entrepreneur magazine. Jesse has written 9 books on the topic of social media marketing and development, including Google+ Marketing For Dummies and Facebook All In One For Dummies, and eats, lives, and drinks social media with a personal combined presence of over 600,000 followers on his personal social profiles.

0 thoughts on “Developers: Here’s How You Access #Hashtags in Your Apps”

  1. Uniform together with best suited temperature is pivotal that
    have ankle towards lamb, no cost a great piece amongst sirloin that is certainly certainly only smart a few or sometimes technique unique.
    One particular particular the complete rooster makes on the subject off Twenty or so minutes.
    They could be included in the non-ionizing assortment electromagnetic radiation, that can be quite different from ionizing light.

    Feel free to surf to my homepage … designer colorful toasters

  2. m getting an error as below , is there any other way ?

    {
    “error”: {
    “message”: “(#200) Permissions error”,
    “type”: “OAuthException”,
    “code”: 200
    }
    }{
    “error”: {
    “message”: “(#200) Permissions error”,
    “type”: “OAuthException”,
    “code”: 200
    }
    }

Leave a Reply

Your email address will not be published. Required fields are marked *