I want to post a reply to a specific comment using Graph API Explorer. How can I do that? I tried several suggestions including
POST /{parent_comment_id}/comments?message={message}, but couldn't just post a reply to a specific comment. Please help.
Please have a look at the screenshot:
Remove the {} from your url. It should be graph.facebook.com/v2.12/5568669414690512/comments?message=Hello
Just make a POST request to
https://graph.facebook.com/v8.0/{{comment_id}}/comments?access_token={{access_token}}
add the body of the request as a JSON
{
"message" : "reply"
}
Related
I'm calling this POST Rest API:
https://www.yammer.com/api/v1/messages.json
Parameters:
body = a simple text message
replied_to_id = <id of the parent I want to reply on>
Documentation here: https://learn.microsoft.com/en-us/rest/api/yammer/messages-json-post
If replied_to_id is a comment, then I would expect my message to appear as a reply to that comment. However, my message doesn't appear as a child of that comment, but appear as another comment.
What can be wrong?
I'm trying to create a page in confluence, via the REST API. I can do GET requests on specific pages correctly, but when I POST a page to a specific Space I just get a 200 response, containing JSON that is the same as that returned from the same URL using a GET request. No page is created. I'm using Postman, and basic auth.
My POST request url looks like this:
http://myConfluence/rest/api/content/
The body of the request looks like this:
{
"type":"page",
"title":"Test API Page",
"space":{"key":"~myUsername"},
"body": {
"storage": {
"value": "<p>This is a new page</p>",
"representation": "storage"
}
}
}
In the JSON above, the space I'm using is my Home space, however I've tried with various other spaces to no avail. It seems unusual that I would be getting a 200 and the same results as a GET request, but on a POST request. Functionally the POST request seems to be acting as a GET request.
Any advice would be appreciated.
For anyone else weirdly having the same issue, here was the fix:
I changed the URL from
http://myConfluence/rest/api/content/
To
https://myConfluence/rest/api/content/
Silly error that cost a lot of time.
I am trying to call an API in ROKU player using bright script. But I a getting "response code -3". But when I am hitting that service on Web Browser it gives the xml in response. Actually there is a redirection in the API which I am using. As I know the redirection is not handled by the ROKU OS level. So How will I come out this situation.
Please help me and provide me any solution for that how can I handle the redirection in ROKU?
Thanks in advance.
The documentation at http://sdkdocs.roku.com/display/sdkdoc/roUrlEvent gives CURLE_URL_MALFORMAT as name for the -3 code you got from GetResponseCode() on the roUrlEvent. Try checking the string you get from GetFailureReason() on that same roUrlEvent, which should give a more detailed description of the problem.
Please check if you are missing any header in http request.
Check for accept header also.
Check this link how to make Get and Post request in Roku.
request = CreateObject("roUrlTransfer")
request.SetUrl("http://blog.roku.com/developer")
html = request.GetToString()
I'm trying to create a comment with Github's api, but it's failing, and I'm looking for debugging tips.
I'm using the url listed in the api docs, which correctly returns a list of comments for a GET request. When I try to do a POST request, I get a 404 response. I'm using an Ajax request from a browser with cors, and I have an OAuth token in the 'Authorization' header field.
The url looks like:
https://api.github.com/repos/username/repo/commits/sha/comments
The post body looks like:
{"body":"hello!","commit_id":"same_as_sha_in_url","line":79,"path":"path/to/file.js","position":2}
I'll answer my own question. It was apparently because my OAuth scope was read-only. Adding 'public_repo' and 'repo' to my OAuth scope fixed the problem.
I'm trying to post a message using the Graph API and a C++ program. I have tried three different methods:
GET with a URL like https://graph.facebook.com/USER_ID/feed?access_token=TOKEN&message=Hello
POST and X-WWW_FORM
POST and FORM-data
In the case 1, I receive the complete list of messages as an answer, but the message doesn't add to the feed.
In the case 2 and 3, I receive an error 403 as the response.
USER_ID and TOKEN are correct and my application has the right permissions. I have reached posting an image to an album with the same application, but it's impossible for me right now to publish messages. Why?
The first method won't work because you need to issue an HTTP POST to that endpoint to publish a new feed story, as a commodity facebook provides the "method=post" GET parameter to "fake" a post, this will work
https://graph.facebook.com/USER_ID/feed?access_token=TOKEN&message=Hello&method=post
and as response you'll get the id of the new post
{
"id": "499801468_1001264776039"
}
Here you can find more details on publishing with the Graph API http://developers.facebook.com/docs/reference/api/#publishing