0

The problem:

I want to find public posts that contain two hashtags (like #games & #movies). The graph search does not work with hashtags apparently. Do you know a way to use the Graph API to set up a query that can help me find those particular postings.

Thanks in advance

fxmtor
  • 123
  • 2
  • 8
  • There is no API for hashtag search as of yet; only thing you can do is the normal search features of the API and search for them as text content. – CBroe Apr 28 '14 at 12:45
  • so you would just employ a multiple keyword search? Should I include the '#' inside the query? – fxmtor Apr 28 '14 at 12:47

1 Answers1

1

You can use the standard Search API for Posts as described in the answer here:

Facebook API - Using javascript sdk and searching public posts for hashtags

For example,

https://graph.facebook.com/search?q=%23selfie&type=post&access_token={user_access_token}

works for me.

Community
  • 1
  • 1
Tobi
  • 31,405
  • 8
  • 58
  • 90
  • thanks! i tried this, but unfortunately i will not get any results even though i know that the particular hashtag should give me around 50 returns. this is the query i use: `search?q=%23hashtag&type=post&access_token=token` – fxmtor Apr 28 '14 at 13:22
  • 1
    Are you using an User Access Token as https://developers.facebook.com/docs/graph-api/using-graph-api#search states? – Tobi Apr 28 '14 at 13:38
  • it seems it does not store any information to my particular hashtag.. i receive `{ "data": [ ] }`the acces_token is correct but maybe i need different permissions? – fxmtor Apr 28 '14 at 14:25
  • Accessing Search API is not a matter of permissions for public posts, only important is that the Access Token type is a User one. Did you try the link I added in my answer with a User Access Token? – Tobi Apr 28 '14 at 14:28
  • yep. did work with your link, and the hashtag "selfie", sadly just not with the hashtag i am looking for :( – fxmtor Apr 28 '14 at 14:45
  • Will you name the hashtag, or is this confident? – Tobi Apr 28 '14 at 14:51