How to pull trending news from Facebook Graph API? - facebook

I would like to pull trending news from Facebook in JSON, in order to use it in other application, but I couldn't find a way to do this. I have tried:
https://graph.facebook.com/v2.5/search/type=trending&access_token=my_accesstoken
and
https://graph.facebook.com/v2.5/search/type=news&access_token=my_accesstoken
but neither work.
Can someone help me please? I would like to know the correct url and type for accessing it.

The API you are trying to leverage is closed off to the public.

The API you are looking for is Keyword Insights
Which is not available to public anymore.

Related

Can I post to a facebook users feed?

I think this used to be possible, and I was trying to update some code, but it does not appear that I can post to the me/feed endpoint using version 11 of the Graph API, Is this correct? Or is there another way to do this that I am missing?
After some more digging, it does not appear to be possible anymore. So much for automations in that context. :(

Instagram Insight Metrics with Facebook Graph API

I am trying to use the Facebook Graph API to GET Instagram metrics such as post impressions. I was able to successfully pull my Instagram Follow Count by using this query
{instagram_user_id}?fields=follow_count
When I try to query my post impressions with
{instagram-media-id}/insights?fields=post_impressions
nothing shows up. Am I missing something or have I possibly not requested the correct permissions?
I am trying to follow the documentation at the below link. Is it even possible to pull the impressions through the Facebook Graph API?
https://developers.facebook.com/docs/graph-api/reference/instagram-media/insights/
Thanks!
I believe that it wasn't possible to pull insights using the older version of the API.
However now it is possible as instagram / facebook just released a new version of their Graph API that includes insights. The request would be:
v2.10/{instagram_media_id}/insights?metric=impressions
The new documentation can be found here
Have you tried to specify "period" parameter? By default it might not be a "lifetime" and if you did not generate any impression recently you will see nothing (empty array i assume). In case you missing some permissions, Facebook will make you aware in response.

How can I find most shared/liked/commented post of a location (country/city) by calling facebook api

I'm looking for a way to find most shared/liked/commented facebook post of a location (country/city) by calling facebook api?
Is this possible to create through the Facebook API? I could not find how to pull information in general that many websites offer.
Any help would be greatl! Thanks
No, there is no direct possibility to do that. You can only get Pages/Places by location (Search API), read their feed (/page-id/feed), go through the posts and calculate on your own.

how to get share count from stocktwits

I like to integrate stocktwits url share in my site and I just want to know how to get share count of a particular URL like fb and twitter doing.
Thank you in advance.
Sorry we don't have that data available in the API. I will make note of it and maybe we offer such an endpoint in the future.

Is there a way of scraping content from Facebook groups?

I'd like to get the content from a facebook group since there is a lot of valuable information in there. So is there way, hack or function that you could accomplish this with?
Simple, do an HTTP POST to the Graph API /{groupId} with your access code and you will get information programmatically. See: http://developers.facebook.com/docs/reference/api/group/