I am trying to perform a search via the Facebook API and getting the following error from Facebook - (#11) Post search has been deprecated
URL I am using to query graph:
https://graph.facebook.com/search?q=search_query&type=post&access_token={access_token}
Any ideas why this is happening as I can't seem to find anything about the post search being deprecated?
UPDATE
Graph API v1.0 has been fully deprecated and is no longer available as a workaround. Original answer below for reference.
Yes, version 2.0 of the GraphAPI does not let you search for posts anymore. See the updated documentation.
You can continue to search for posts by changing your API call to:
https://graph.facebook.com/v1.0/search?q=search_query&type=post&access_token={access_token}
I.e. add v1.0/ after https://graph.facebook.com/
As mentioned Niraj Shah, searching by the type "post" is already 'Legacy' API method and could be used with path '/v1.0/search?type=post', BUT there is one more trouble - your application can't use v1.0 API, if it was created after 30th April 2014. So be careful. According this answer.
According to Facebook, "All Facebook-enabled apps will be automatically upgraded to API v2.0 on April 30, 2015. If you have mobile apps, you'll need to update your app well before that date - leaving additional weeks for people to download your update from the store", and "Public post search is no longer available".
Check this for details: https://developers.facebook.com/docs/apps/upgrading
Related
What is the correct way to start using Instagram oEmbed feature? Documentation (https://developers.facebook.com/docs/instagram/oembed/) claims that I have to pass App Review to start using the feature. And application form says Please provide a URL where we can test Oembed Read. Which I don't have because I have no access to the feature.
What I have tried with no success:
I requested instagram_oembed resource with:
app token of application in live mode
app token of application in
development mode
passed URL to a post by official Instagram account
(e.g. https://www.instagram.com/p/CQG4gZxMzzO/)
passed URL to a post
of a user who is Admin of the app
In all cases I receive (#10) To use 'Oembed Read', your use of this endpoint must be reviewed and approved by Facebook. To submit this 'Oembed Read' feature for review please read our documentation on reviewable features: https://developers.facebook.com/docs/apps/review.
Example of the request I do https://graph.facebook.com/v11.0/instagram_oembed?url=https%3A%2F%2Fwww.instagram.com%2Fp%2FCQG4gZxMzzO%2F&access_token=appAccessToken
We're also suffering from this issue, but so far, we thought we already figured out how to do that.
Big picture
Facebook had not sorted this thing out correctly. Or at least, we don't know why they put such a restriction to this API.
The official document is not correct. (or at least not accurate for now, for some part)
Which part was not correct?
The access token part is not right. Or at least, it's the most confusion part.
How can we resolve this?
Use the Graph API Explorer
Adjust your token(App token, Client access token, user token) with the official URLs(see below) to see if you can get the result
most of us should be able to get the result with user access token, which means you have to access this API after login!
Integrate into your app for review
The review page is also confusing:
Please provide a URL where we can test Oembed Read. Include the URL of a page, post or video from our official Facebook or Instagram pages, or the pages themselves., it means you can only use links like https://www.facebook.com/instagram or https://www.facebook.com/facebook
With that in mind, so far, the only way to get approved is integrate your oembed usage into your normal UI with facebook user access token ready
Question to the big picture
So, we have to ask user to login with our facebook app, then we can provide this oembed read API returned embed HTML? I'm afraid that's what we have now.
big companies might be able to apply for App Token, I guess in that scenario, facebook login is not necessary
for small companies, indie developers, hmmm, I don't know any better solutions so far.
I have run into this too. I do not have an answer at this time, I just want to report on the frustrations of their 'app review' process. Which makes it feel like you are unlikely to get it to work any time soon.
We have a custom embed code for our weblog authors to use (a shortcode kind of thing) which does the oEmbed call. We just take the HTML from the resulting JSON, and insert it into the weblog article page, and that is it. It stopped working, presenting this same error - in live mode, and in development mode.
The kicker is, I then tried submitting it for app review. Filled out everything I could to the best of my knowledge. Provided them a test account and post on our weblog to show the shortcode editing and expected placement. We got rejected. Why? Your embedding resulted in an error, we can't see it in action to approve you.
Yes. The error I am getting is that I need my 'app' to be reviewed and approved.
This is an infuriating process. This is the only Facebook / Instagram API feature we use at this point. No user data. No attempt to make an Instagram clone app or anything like that. Just an embed.
And they are making this simple use case as impossible to use as they can. And the documentation also feels like an infinite loop. They say users of the old Instagram embed call have until September 7 2021 to get approved. But the call does not work at all because we are not approved. So we cannot get approved.
Same loop here. I've managed to report it to Facebook team and get answer "Just submit your Instagram post URL"! I can't believe it, its can't be so simple. I've confirmed it few times with Facebook team person and.... get rejected!
Also, second form in App Review process will LOWERCASE all of your links and I've spent few days just to explain it to reviewers and support person. Still rejected after submitting proper url. This is insane.
My another attempt was about to build a test page where I can auth via Facebook account, parse connected Instagram accounts and GET embed endpoint with user access key in hope that reviewer HAS access to oembed feature - REJECTED. I can't even find what permission I need to add to auth URL to obtain oembed thing.
Will update my answer with new information later.
UPDATE: After reporting about the issue with lowercase URL in submission form they just APPROVED my app without APP REVIEW. Well... Facebook style...
I had exactly the same problem recently. Updated the packages with compose, changed the API version from 10 to 11... without any change.
The error was also occurring in development mode, it didn't make sense that Facebook was asking to approve in dev mode.
For me, the problem came from the management of scopes in my application, depending on the version of the Facebook API used.
My advice: check the scopes defined with API version in your code first.
I had the same issue and the solution is very simple. The only thing you need to do is copy paste an instagram url in the input field saying: Please provide a URL where we can test Oembed Read.
I did the this link: https://www.instagram.com/p/G/
Which is actually the first instagram post :) Got approved. Hope this helps everybody!
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
In Facebook Graph API v2.3 it was possible to get all links belong to specified page using "links" edge:
GET v2.3 {page_id}/links
This request shows really all links (not only published, which are accessible by /feed request). Graph API Explorer still can execute this request.
But all new Facebook applications can use only Graph API v2.7, not older. FQL also was deprecated at 08.08.2016.
So, how can I get all links from page (not only published) by Graph API v2.7 from my application? Even dirty hacks are appreciated, thank you.
Upd.: Links posts are promotable posts. They did not showed by /feed, only by /promotable_posts, which is necessary endpoint for my needs. I've found also a necessary parameter for this endpoint which shows really all links posts: include_inline.
So, final request is:
GET v2.7 {page_id}/promotable_posts?include_inline=true
GET /v2.4/{id}/links and GET /v2.4/{id}/statuses will no longer be available beginning in v2.4. As an alternative, we suggest using GET /v2.4/{id}/feed.
Source: https://developers.facebook.com/docs/apps/changelog
So you will have to use the feed endpoint and filter out links on your own.
With FQL being deprecated, is there an alternative graph-y way of fetching the post-comments from a specific user without resorting to downloading all comments first and enumerating them?
Before I could just trigger an FQL statement like
SELECT text FROM comment
WHERE post_id = '<postid>' AND fromid = '<uid>'
But since that is no longer supported without using the older API, I'm wondering if there's an alternative for v2.1 and up?
Why? I organise a fair amount of give-away-contests on Facebook and have a script that retrieves the amount of likes from the announcement post, picks a number of random ones and then retrieves the comments of those users on that same post.
As a side remark: I hate it that I as a page owner cannot retrieve a list of people that liked my own page via the API. I still have to check that manually each time.
Unfortunately there's no way to filter the comments by user directly with the current Graph API version.
If you're using a v2.0 app, you can still use FQL until August 7th 2016. I'd wait and see if FB amends the Graph API with similar functionality as FQL had in the future.
Facebook API does not provide friends list of people using our fb app, according to their developer faq page. But still, websites like nimble and the live example of socialauth are able to get the names of people on our friend list, even those who do not use their app. Please, can any one help me with how this work?
The read_friendlist permission gives only name of lists like 'close friends', 'aquaintance' etc. the user_friends permission gives only the list of people in our friendlist who use our app.
What all api permssions do we need to get the full friend list?
I am trying to make an address book by importing contacts from google, facebook etc. using socialauth. Had success with google.
Those websites are probably using older Apps with v1.0 - it will stop working for them after end of April 2015. You can only use v1.0 with an App created before end of April 2014.
All 'friends_*' permissions have been removed from new version 2.1
You can use 'user_friends'
https://developers.facebook.com/docs/apps/upgrading
https://developers.facebook.com/docs/apps/changelog
For fetching app users user 'me/friends'
For more friends use 'me/taggable_friends' .
Remember it will still not return whole friends.
In new facebook api version there is no way to fetch whole friend list at one time