Developers: Here's How You Access #Hashtags in Your Apps - Stay N Alive

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

853d6-images-6030473

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!)

Discover more from Stay N Alive

Subscribe to get the latest posts sent to your email.

8 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. it gives me the below error

    {
    “error”: {
    “message”: “(#11) Post search has been deprecated”,
    “type”: “OAuthException”,
    “code”: 11
    }
    }

  3. 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
    }
    }

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

    this is the result for the above given by u

Leave a Reply

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

Discover more from Stay N Alive

Subscribe now to keep reading and get access to the full archive.

Continue reading