how to post comments using api and stop comment notification - facebook-graph-api

i want to post comments using graph API and stop comment notification
look at this linehttp://graph.facebook.com/post_id/comment?method=POST?notification=off
Please tell me how to stop notification this code does not work..

Related

How to stop receiving ‘AWS Notification Message’

I’m set up with AWS and for every email that gets generated by my website a subsequent email is fired off by aws with the header:
‘AWS Notification Message’
Is there a way to stop this from happening? It is going to my bounce back email if that helps in anyway. I’m suspecting I may have a setting enabled but I’ve been through much of AWS and can’t figure it out.
There is a link in the email to unsubscribe it with the below message.
"If you wish to stop receiving notifications from this topic, please click or visit the link below to unsubscribe:"
Screenshot for your reference.

Facebook not giving useful information in webhook

I have implemented Facebook webhook successfully by https://developers.facebook.com/docs/graph-api/webhooks/
I have subscribed to But it is missing useful information, It gives me following response
The JSON is for example:
{
"object":"user",
"entry":[{
"uid":"1408932149",
"id":"1408932149",
"time":1370253930,
"changed_fields":["feed"]
}]
}
But I want to track what actions happen on user's post which posted by my application. Here on every action it gives me feed in changed_fields. Its pretty useless for me
Basically I want to track like, comment and share of the posts for users in real time which shared from my software/app. I have subscribed to this reference https://developers.facebook.com/docs/graph-api/webhooks/reference/user/
I know for page it is working through webhook but how can I track user's post data with the webhook?
Can anyone suggest where I am doing wrong?

Facebook Messenger Bot: Not receiving POST request from FB

Weird thing is happening, I have registered my webhook and setup up everything, but now I am not receiving POST requests anymore when I am talking to my bot. FB only sends me GET requests to the webhook when I send a message.
Does anybody have an idea what the problem could be and how I can look for a solution?
Thanks in advance!
Re-authenticate your page.
curl -X POST "https://graph.facebook.com/v2.6/me/subscribed_apps?access_token=<ACCESS_TOKEN>
I was having the same issue and spent a lot of hours banging my head on the wall before I found this:
yii2 Webhook post empty
Not sure if its the same problem the OP had, but I think is usefull to leave it here anyway: the hook was being called with POST, not get, and the data was being sent, but PHP does not receives it on the $_POST, and so it looked like a GET (because Yii::$app->request->post() returns false). But then I logged $_SERVER and it was actually a POST request, except $_POST was empty. Then I found that answer
To retrieve the data facebook sends on PHP, you need either have to use
$data = file_get_contents("php://input")
or, if you use the Yii framework:
$data = json_decode(Yii::$app->request->getRawBody());

How to edit an existing event using the Facebook Graph API

I've done extensive research on this, and am baffled. Similar questions on stackoverflow have been answered with, in in short: RTFM. Well, I've done that, and more, and I still can't find how to do this.
On the main FB Graph API page, documentation is given for authenticating, reading, publishing (creating), deleting Graph objects, but I don't see modifying anywhere.
The FB Graph API > User page gives description only of how to create and delete an event on behalf of an authenticated user. I've had no problem with these two actions.
The FB Graph API > Event tells you how to retrieve an existing event, as well as publish to the existing event, posts, links, feed, etc. Once again, no help with modifying.
I've tried (desperately) (':'s removed intentionally due to hyperlink limit):
Sending the same POST request as creating event, ie to https//graph.facebook.com/<user_id>/events, but with an extra 'id' parameter--the existing facebook event id. Facebook doesn't like that, gives me an 'id parameter already sent' error (I'm assuming the user's id).
POSTing to the event directly ie to https//graph.facebook.com/<fb_event_id>/ using the same auth_token as was used to create it. 'Post unsupported' error message.
The fields I send along with the POST are the same as those when creating the event-- 'name', 'location' etc.
If someone's been able to do this, one simple POST example would clear everything up for me.
Thanks!
UPDATE I started using the PHP SDK, but lack of examples disheartening. In hopes that this will save someone else frustration Here are doc examples augmented with an actual api call example:
"You can create an event for a user by issuing an HTTP POST request to
PROFILE_ID/events with the create_event permissions and the following
parameters."
$facebook->api('/'.$profile_id.'/events', 'POST', $params);
Normal enough ... but edit event docs (as of 12/7/12) are misleading:
"You can edit an event by issuing an HTTP POST to /EVENT_ID with the
create_event permission. "
$facebook->api('/events/'.$eventid, 'POST', $params);
Brian
I was able to update a page event by using a POST (not a PUT) directly to the event, using the account or page authentication token. It sounds exactly like what you did in 2 above.
curl -F 'access_token=...' \
-F 'name=A modified event name.' \
https://graph.facebook.com/event_id
I would suggest that you try just sending a modified name field. Also, because you have already created the event, you have the correct permissions. For those who don't know, you need the extended permissions of offline_access, create_event, manage_pages, etc.
It is frustrating, because at one time there was documentation on updates on the Facebook site, but now I can't find it.
Updating is the same as creating BUT, you can only update events created by your APP ID..

How to post a message on wall of facebook using a graph api

How to post a message on the wall of facebook or add comment to the thread using a graph api.I want a url of that.
like for adding a message to wall
https://graph.facebook.com/profile_id/feed?access_token=generated token&message=hi
But it not working ,it not get added to my wall.
You need to add &method=post to your request URL. Also, you must have the `publish_stream extended permission for your application.
https://graph.facebook.com/user_id/feed?method=post&message=hi&access_token=generatedtoken.. will work
instead of profile id give the user id
Hope this will work