Yammer REST Api: replies appears as comments - rest

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?

Related

Replying to a specific Facebook comment using Graph API

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"
}

GitHub Webhook - payload on "edited" action doesn't contain the new body

I am trying to get the (new) body from an edited issue comment. I don't know if I am missing something here, but it seems that the webhook payload returned with an edited issue comment, contains only the old comment... There is no way to tell what was changed.
What I do at the moment, is when I get an issue comment event with an action "edited", to make a get request for this comment in order to retrieve its body.
Is this how it's supposed to be? I find it strange that I need to make a new request for something that should already be in the issue comment payload.
There are some issues with webhook content returning old data, presumably due to caching and/or replication issues in GitHub's backend. GitHub support themselves have confirmed to me that this can happen.
The only workaround right now is to fetch the comment content in a separate API request after some small delay in order to allow the updated comment body to propagate through GitHub's backend (the bug affects API requests as well as webhook events, annoyingly).

Search gmail api by custom header

I am trying to search gmail api with custom header (this case it is named notification-id), but it does not work. Request I am making:
GET https://www.googleapis.com/gmail/v1/users/tme/messages?includeSpamTrash=true&q=notification-id%3A560d01cef318893c3c000016
I tried the same query using default header (rfc822msgid) from google mail api and it works with this request:
GET https://www.googleapis.com/gmail/v1/users/me/messages?includeSpamTrash=true&q=rfc822msgid%3A560d01d068c_6690c6f31857290%40ip-172-31-12-127.mail
Any ideas why it does not work with custom header?
I tried to do this myself a while back, and came to the conclusion that it was not possible. Someone please correct me if I'm wrong.
According to the Advanced search-documentation, you can search for the following headers:
from, to, subject
list:
Messages with the words info#example.com in the headers, sent to or
from this list
deliveredto:
Any message with username#gmail.com in the Delivered-To: field of the
message header (which can help you find messages forwarded from
another account or ones sent to an alias).
rfc822msgid:
Locates the exact message with the specified SMTP message-id.

How To Register New User Using Dwolla API

This started as a question, but in the process of posting this question, I solved it. So now, this is an FYI post...
==========
At first, whenever I tried to post to this URL, I would get an error message:
https:// www.dwolla.com/oauth/rest/register --> Bad URL
There is no operation listening for
http:// phx-dwol-web1.cloudworks.com/oauth/rest/register, but there is
an operation listening for
http:// www.dwolla.com/oauth/rest/register/, so you are being
redirected there.
I fixed by appending the auth values to the post URL:
https://www.dwolla.com/oauth/rest/register/?client_id={id}&client_secret={secret}
--> Good URL
Then, I was having trouble with request formatting. To fix this, make sure that you post JSON in the BODY of the post. Do NOT append to the URL, or submit as form fields.
Lastly, when I finally got a proper response from the Dwolla API, I was getting this error:
"New user must accept terms of service."
This is because the Dwolla API is CASE SENSITIVE, so the "ACCEPTTERMS" parameter in the JSON body must be submitted as "acceptTerms" in order for it to work.
Here is the documentation I am referencing:
http://developers.dwolla.com/dev/docs/register
Happy coding!
Thanks for the answer...it ultimately led to me solving my problem as well.
For completeness, I encountered this error when sending a poorly formed request to the api, where I had left off the trailing / before the get parameter {oauth_token}.
INCORRECT:
http://www.dwolla.com/oauth/rest/users?oauth_token={oauth_token}
CORRECT:
http://www.dwolla.com/oauth/rest/users/?oauth_token={oauth_token}

Error 403 when using Graph API to post a message on a feed:

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