facebook api event feed and comments deprecated - facebook

I just started with facebook API and can't figure out facebook event feed
so I found in documentation facebook event/feed API, but after that, I found facebook blog post where it says that feature is deprecated...
but the official documentation doesn't have any note that I can't read feed from it...
as for example, I use Graph API Explorer and I created my private event - for permission I gave it all just to make sure that it's not a permission issue
Will it work if the event is public? or this is deprecated?
EDIT: no its not wirking
example:
event-id 217752602230122
request 217752602230122/feed 217752602230122/comments
will return empty data
but request 217752602230122 will return info about event
{
"description": "testing fb api",
"end_time": "2020-01-01T15:00:00+0100",
"name": "Facebook test API",
"start_time": "2020-01-01T12:00:00+0100",
"id": "217752602230122"
}

Related

Facebook Graph API: Unable to reply a comment on unpublish page?

I'm using the Graph API Explorer to reply the comments on fan page via my app.
It works only the page is published. However, it bothers me so much.
How do I to test the app before publishing the page?
What I'm trying to do is the app will listen to the webhook from Facebook and then reply to the comment as long as got a comment.
I've been search for a while, there's very few questions related to this. Any suggestion would be thankful. ;)
// POST
https://graph.facebook.com/{comment-id}/comments
// response when the page is unpublished
{
"error": {
"message": "(#200) Cannot access object_id: {comment-id}",
"type": "OAuthException",
"code": 200,
"fbtrace_id": "{fbtrace_id}"
}
}
Confirmed that you can't access the comments while unpublished as the page id prepends the comment id. I would say quickest and easiest way to test is to just create a separate test page and keep that published.

Commenting on posts Facebook graph api V2.10

Is it possible to comment on any post using the id of the post ? I tried with the V2.9 and the comment is successful but when I tried it with V2.10 it shows me the following error
{
"error": {
"message": "(#3) Publishing comments through the API is only available for page access tokens",
"type": "OAuthException",
"code": 3,
"fbtrace_id": "B7DlJt0HMOL"
}
}
This is what I did in the Graph api Explorer
When I switch the version to V2.9 the comment in the post is successful. Why does this happen or how can I fix it?
The error message tells you what the issue is, commenting on everything else than Page posts is deprecated since v2.10 and will not work anymore:
90-Day Breaking Changes
POST and DELETE /{comment-id} — This node now requires a valid page access token.
For more information, take a look at the changelog: https://developers.facebook.com/docs/graph-api/changelog/version2.10

App Scoped Id - Link to Facebook URL

Previously - we were able to use the /account_id?acesss_token=APP_ACCESS_TOKEN to get the users information that authed in your app.
For the new v2.0 API, we get app_scoped_id where the folllowing method:
https://graph.facebook.com/v2.0/APP_SCOPED_ID?access_token=APP_ACCESS_TOKEN
Works for some users, but others - we get this:
{
"error": {
"message": "Unsupported get request. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",
"type": "GraphMethodException",
"code": 100
}
}
Why would this function work for some users, but not others? We have no way to get the link property of the user to redirect them, nor does http:///facebook.com/SCOPED_APP_ID do anything or http://facebook.com/app_scoped_user_id/SCOPED_APP_ID work correctly. Anyone have advice to redirect the user to their FB profile via the FB Scope App ID?

How do i mention user in my Comment while replying from FACEBOOK GRAPH API?

I am using Facebook graph API, I want to know that how can I mention person in a comment while i am replying to the POST?
when i am trying to do it with the format #[ID:NAME] E.g (#[12345:Abc]) it gives me an error like
{
"error": {
"message": "(#1705) There was an error posting to this wall",
"type": "OAuthException",
"code": 1705
}
}
As per this post of stack overflow Tagging/Mentioning Pages or Users in Posts via Graph Api
I come to know that you cannot tag user via API.
You can't tag people on a feed using the Graph API, you have to use
Open Graph concepts- Mention Tagging/ Action Tagging (based on your
requirement)
Source : Tagging/Mentioning Pages or Users in Posts via Graph Api
You can use Open Graph API -
https://developers.facebook.com/blog/post/2012/08/21/bringing-mention-tagging-to-open-graph/

facebook - Like a page through API

I'd like my application to like a facebook page on behalf of the user with an API call.
I saw this part of the documentation and tried to make the following post request:
https://graph.facebook.com/101544000571/likes?access_token=MY_ACCESS_TOKEN
where 101544000571 is a page id and got the following error:
{
"error": {
"message": "(#3) Application does not have the capability to make this API call.",
"type": "OAuthException",
"code": 3
}
}
I thought it's a permission problem but the application (in this case it's the graph API explorer application) has all the permissions necessary.
What am I missing here?
You cannot like a page using the Facebook Graph API. It is not supported.
You can use the the Like button social plugin.
The doc mentions : "For Facebook Pages or websites that do not integrate with Facebook Authentication, developers should continue to use the Like button social plugin."