How to find most commented article (using disqus) - django

I am using Disqus for commenting on articles in my site. I want to find the most-commented article using the API. Could you provide me with some pointers?

This API endpoint will load the most-commented articles on your site within an interval up to 90 days: http://disqus.com/api/docs/threads/listPopular/
An API request for you would look like this:
GET https://disqus.com/api/3.0/threads/listPopular.json?api_key=YOUR_API_KEY&forum=YOUR_SHORTNAME&limit=1&interval=90d
Additionally if you wanted to also get the top comment from that article, you can add &with_top_post=1

Related

Facebook/Instagram API - Getting Popular Hashtags

I am trying to use the Instagram API for one of my projects. The task I'm trying to accomplish is getting popular hashtags based on an input keyword.
To elaborate a bit: when you're on Instagram, and start typing a hashtag, you get a popup with suggested hashtags related to what you're typing, sorted by popularity.
I'm trying to get these suggestions, but through an API call. Looking at the Instagram API docs, there is Hashtag Search as shown here, but this endpoint searches for posts which use the input hashtag, which is not what I want.
Another post suggested I have a look at Facebook Graph API instead, but again no luck there either.
I know this is possible to do as certain websites which provide services to schedule posts, like this one do it.
So, is there an endpoint in either Instagram or Facebook API that I've missed, or is there any third party API / tool that can accomplish this?
There is not currently any "trending" features as part of Instagram Graph API.

Where is the facebook graph api documentation for searching anything

While researching I found that it's possible to research things on facebook using the /search path. However I cannot find any documentations on how to use this functionality.
I already know that the graph api documentation is https://developers.facebook.com/docs/graph-api
I already looked at the places search documentation at https://developers.facebook.com/docs/places/search
Nevertheless, what I would like to know is all parameters that I can use for the graph.facebook.com/search
For the moment I know that I can use q, and type with user,page, or group.
Where I should look for the complete documentation about this path?
Edit: Solved
Look at the comment by CBroe 13
It looks like Facebook has recently removed the documentation for this, maybe temporary, and probably because of recent "privacy breaches". You can check out this older copy on https://web.archive.org/web/20170104062957/https://developers.facebook.com/docs/graph-api/using-graph-api/#search – CBroe 13 hours ago
Per
https://developers.facebook.com/blog/post/2018/04/04/facebook-api-platform-product-changes/
Search API
Deprecated: Support for finding pages, groups, events, users using
search.
It's not deprecated, it's discontinued.
While they say it is "deprecated", it has been terminated and so far I have not found anything that speaks of a replacement. Here is another announcement:
https://developers.facebook.com/docs/graph-api/changelog/breaking-changes#search-4-4
FYI, I have posted a comment on the Facebook Developers Community page, hoping to elicit some kind of response from Facebook:
https://www.facebook.com/groups/fbdevelopers/permalink/1742432315800275/
You can find detailed Graph API documentation on the developers page
https://developers.facebook.com/docs/graph-api/using-graph-api/
Details about Search API is also available here.
https://developers.facebook.com/docs/places/search

How can I unpublish/delete a comment of an Facebook Ad?

I need a solution where I can unpublish/delete comments on Facebook Ads. There are paid tools which have this feature, like this one:
https://www.agorapulse.com/blog/comments-facebook-dark-unpublished-posts
"Finding and responding to these comments was a major headache, so we
went digging on Facebook’s API and found a solution to include all
comments made on dark/Unpublished posts and we included them in our
unified Facebook Inbox."
With the normal command endpoint I can't get the commands for ads.
How I can access and manage the commands, which API endpoints I need?
There are a few endpoints you'll most likely be interested in:
1) Your ads are connected to a page, so you'll need to get data for your Page. See https://developers.facebook.com/docs/pages/managing for reference.
2) Your page contains the posts. See the section titled "Getting Page Posts" in the link from step 1.
3) The posts contain comments. Using the id of the post, make the appropriate API calls to get its posts. See https://developers.facebook.com/docs/graph-api/reference/v2.9/object/comments/ for reference.
4) Once you find the comment you want to delete, make the appropriate DELETE call on it. See graph-api/reference/v2.9/comment/ for reference.

Facebook API: Get people list who like a page

Is there any way to get all people list who liked our page using Facebook API? I looked at the documentation but i am not able to find that.
Can any one help me out. Thanks
Simple answer: There is no endpoint for that in the Graph API. You can get some breakdowns via the Page Insights, but not the actual people which like your Page.
See
https://developers.facebook.com/docs/graph-api/reference/page
https://developers.facebook.com/docs/graph-api/reference/v2.4/insights
https://developers.facebook.com/docs/graph-api/reference/v2.4/insights#page_users

How to know if a comment on a page post is hidden in Graph API

We are looking for a way to find out, if a comment is hidden on a story on a page feed. We are using the Graph API to get the comments: [story_id]/comments with an Admin Access Token. Facebook tells us if we can delete the comment. However, there is no "is_hidden" flag or something.
Is there any other way to find out if the comment is hidden/marked as spam?
Thanks!
I'm PHP Developer, we have also used Facebook Graph API many times.
As per my expertise, I think we cannot fetch/identify only hidden/spam comments.
But yes you can get the comments for only particular user if you want.
For example:
1.) Get id of a fanpage with public graph data: http://graph.facebook.com/cocacola - thumsup has 507267189335315.
2.) Get ThumsUp's "like plugin" iframe display directly with some modified params: http://www.facebook.com/plugins/fan.php?connections=100&id=40796308305
3.) Now check the page sources, there are a lot of fans with links to their profiles, where you can find their profile ids or nicknames
4.) If you are interested only in profile ids use the graph api again - it will give you profile id directly
I hope you will find my answer appropriate.
If you are getting some other solution, please share
Thanks,
Shreyas
By now, finding out if a comment is hidden can be achieved via the is_hidden flag.
More detailed answer on a similar question
Facbook API docs for comment endpoint