Can we search all the public post referring a particular keyword using Facebook Graph API? - facebook

I need to get all facebook posts with the sdk by searching with one word

There is no way to do this, for normal 3rd-party apps.
What you can search for via Graph API, is quite limited - https://developers.facebook.com/docs/graph-api/advanced#search
(This used to include other stuff before, searching for users, etc., but most of that has since been removed.)
There is the Public Feed API - but that is not available to normal 3rd-party apps, https://developers.facebook.com/docs/public_feed/:
Access to the Public Feed API is restricted to a limited set of media publishers and usage requires prior approval by Facebook. You cannot apply to use the API at this time.

Related

Why Facebook Graph API doesn't list all public events for a page?

There're lots of events for this venue:
https://www.facebook.com/pg/ClubRoxyPrague/events/
However when requesting with Graph API we only get a few. Here's link to Graph API explorer:
https://developers.facebook.com/tools/explorer?method=GET&path=ClubRoxyPrague%2Fevents&version=v2.12
Until recently this worked well for us. Maybe it's data access restrictions Facebook announced few days ago: https://newsroom.fb.com/news/2018/04/restricting-data-access/
Why the API returns only some events? Is there any way to fetch all public events hosted by a certain page?
Due to the breaking data access changes you mentioned, it already wasn't possible to access events directly (also see: Unsupported get request in get Facebook event).
It seems like your specific issue is a logical consequence of that decision (although the /{page-id}/events was still available up to today, I personally already found it pretty strange that events were still accessible indirectly).

Facebook API - Advanced Search

I'm trying to replicate some functionality of the Facebook web interface via the API and am a bit stuck. Basically, via the web site I can enter 'Favorite pages of people named "jim"' in the search box and get a slew of results, but I haven't found a way to replicate this type of query via the API. Is such a thing possible?
As WizKid commented, Graph Search is not available with the API, you can only use the Search API for searching: https://developers.facebook.com/docs/graph-api/using-graph-api/v2.1#search
Keep in mind that public search and news feed search are not available in v2.0 anymore, see changelog: https://developers.facebook.com/docs/apps/changelog

Has the Facebook graph search API been removed in Graph API version 2.0?

I can use the Facebook Graph API successfully (within my iOS app) for several calls but I'm trying to use it for searching.
I implemented the url after googling and getting many hits, i.e. Does facebook have a public search API yet?.
I can use the search API from a browser and get results, however it doesn't work from within my app.
So I had a look at the Facebook graph API reference https://developers.facebook.com/docs/graph-api/reference/v2.0
and search isn't listed there. Has it therefore been removed?
Be aware that Facebook has just taken down public post search in Graph API v2.0 so you won't be available to do that anymore.
Check https://developers.facebook.com/docs/apps/upgrading under section Graph API "Public post search is no longer available. (/search?type=post&q=foobar)"

Facebook public feed API

i'm working on project which mostly is a data-mining from social networks, so far, i've done twitter and it have really nice API, which allows me to pick an endpoint and recieve alredy filltered twits as streaming data. Now i'm working on a facebook, and there comes the question: with Graph API i would be able to get public feed of some definite page, but what if i would like to recieve posts from as many people as possible? Does Facebook Public Feed API works as Twitter's, and gives me data from as many sources as possible, or i missunderstood something?
Facebook has restricted public feed api usage and its now available only to handful no of teams: https://developers.facebook.com/docs/public_feed
Access to the Public Feed API is restricted to a limited set of media publishers and usage requires prior approval by Facebook. You cannot apply to use the API at this time.
You're look for the Facebook Search API. https://developers.facebook.com/docs/reference/api/search/
You'll need an app with a token to access these. Some might need higher permissions though, but the generic one will work to search commons actions types (post, places, etc) who're publicly available on the platform.
You won't be able to search for private publications. Unless you search user who gave you direct permissions to read their timeline (one by one).

How do I publish an activity on facebook using the Graph API

The old Facebook Legacy REST API had a function dashboard.publishActivity, however the new Graph API only allows messages to be posted on /me/feed.
Is there a way to send activities using the Graph API?
As mentioned in http://developers.facebook.com/blog/post/552/ Facebook "have removed the section which displayed the News that developers published via the Dashboard APIs in the Games Dashboard". Therefore the dashboard.publishActivity function no longer provides any useful functionality. My recommendation is to switch to either using stream posts or to Requests 2.0, as these will provide the same sort of distribution that you're looking for.