How to search instagram comments containing particular keyword - perl

I want to search the comments published on any media for any particular key word or combination of few key words. My requirement is to get the comments containing that keyword with the help of API. I went through the documentation of Instagram API there I found that search can be made through hash-tag only and most of the time not necessarily my keyword is a hash-tag. So problem is I want to search though the text. That means if the text containing my keyword then it should return that text else not.

There is no API to search for "keywords", you can only search one hashtag with API, and it searches in photo caption as well as comments.
You will have to use /media/media-id/comments API to get all comments, save it and then manually do a search. This is not efficient way.

After you tag your post with a hashtag, you'll be able to tap the hashtag to see a page that shows all photos and videos people have uploaded with that hashtag. There is no API to search for "keywords", you can only search one hashtag with API, and it searches in photo caption as well as comments.

Related

Query for pages of a specific type on Facebook

I need to have something like http://fanpagelist.com/category/musicians/ in my web app.
Basically I need to allow users to search through Facebook pages of musician/band category and sort by number of fans.
The closest I got was with this FB Graph API call:
search?q=musician&type=page&limit=25&after=MjQZD&fields=name,fan_count,category
But that is searching for pages that have 'musician' in the name, not in the category field.
Any idea? It must be possible since fanpagelist can do it...
There is no way to filter the results from that search endpoint directly.
You are limited to the options described under https://developers.facebook.com/docs/graph-api/using-graph-api/#search, and that basically means you can search by name, but nothing else.
So you will need to filter the results on your end.

Facebook Group Search post without comments

Hi,
As title, in my facebook group, I need to retrieve only post without comments.
I see the search box and notice that searching something will give an url with
`?query=Word%20Search`
and maybe there is a way to search post without comments by url.
Thanks for help!
You must use the Graph API to retrieve data from Facebook. There is example code how to get the group feed in the docs: https://developers.facebook.com/docs/graph-api/reference/v2.2/group/feed#read
You canĀ“t filter by posts without comments, you need to do the filtering on your own after getting the posts.

Facebook Search API, keyword search does not display posts made in a page but only in a profile

I am using the facebook search API to find posts that include my keyword. I noticed that the posts returned always belong to facebook profiles but never facebook pages. To back that up, I searched for keywords of low frequency which I spotted in pages but the API did not return them.
Is there any way I can search by keyword and get posts from pages too ?
Taking a look at the documentation: Just search with &type=post. From that documentation:
All public posts: https://graph.facebook.com/search?q=watermelon&type=post

How to access the facebook smart list?

I wanted my application to post a status on users wall which should be seen only by the persons in that locale? How is it possible to restrict it in facebook apis?
The documentation for a Post has a detailed list of all fields, one of them is the "privacy" which controls who will see the post, it says:
object containing the value field and optional friends, networks,
allow, deny and description fields. .... The description field may
contain a comma-separated lists of valid country, city and language if
a Page's post targeting by location/language is specified.
I recommend that you go and check it out since it has much more text written on this field.

Post multiple hyperlinks with an anchor text to a facebook wall via Graph API

I need to make a post to my facebook wall from my windows application. The post must have multiple links embeded within the post content. I can do it using Grap API but the problem is that I cannot specify an anchor text for links. The links themselves are very long so it's absolutly necessary for us to have an anchor text. But it seems facebook does not understand anchor text tags.
I know there is a "link" object but it's not an option because it allows only one "link" object per post.
Is there any way to post multiple links with an anchor text within a single post via Graph API?
Thank you
In short, no.
You can use a Link object, in which case you can supply a Message, Title, Description and Caption, but you can't actually hide the link, or display different text on your link - Facebook will always control how your hyperlinks work.
Other messages and Posts are plain text, so you can't use HTML formatting elements either.
It's all done to reduce the potentially hideous display of messages posted to Facebook, and to protect users from disingenuous link texts.
You can use Facebook Notes feature instead. Facebook Notes fully support HTML.
See this. How spotify have done this if formatting html elements are not allowed.
Facebook notes really support HTML. So yo can post links like this:
03131991saty