Translating Links in Comments into User IDs - asana

When I get stories from the API with a type of "comment", several of them have links where Asana users/people are mentioned.
How to I translate these links into user ids?

Unfortunately there isn't really a way to do that yet. The links in comments are processed through our Hypertext when displayed to users and contain a link to the user's "Assigned to Me", rather than some user profile.
We're thinking of ways to make the mapping easier on API consumers, but right now there isn't a solution planned.

Related

How to add "Order Online" link on GMB using the API

[NOTE: This may be not the right place for this question. Can you please refer me to the right place if this is not.]
I know you can login to GMB, verify the business and than add the "Order Online" link from the GMB console.
We are an agency and expanding fast so we are trying to find out a way of adding our link to all our customer's GMB pages without needing to getting verified for each of them separately but rather using the API if possible.
Anyone here has experience doing this? I looked through the API, but can not find anything like this.
It is not possible to influence this attribute. See this article
In some cases, links to certain third-party booking services will appear automatically on business listings. These links cannot be edited in Google My Business.
If you want to remove or fix a link in your own listing, please contact the third-party provider’s support team or a technical contact to request they remove your data from the information they are sending Google.

Asana: convert user #-tag to API object

I'm parsing the description of tasks for user links (#-tags) that we use to identify different roles on an item. I noticed something weird about the IDs though.
In the notes of a task returned from the API the #-tags are converted to links in the form https://app.asana.com/0/<int_id>/<int_id> which, when visited in the browser, show the user's tasks but when I use that ID to query the API as in https://app.asana.com/api/1.0/users/<int_id> I get a 403 with this response: {"errors":[{"message":"user: Not the correct type"}]} - further investigation showed that the IDs used in the #-tags are different from those used in the API for the same user, even though they both lead to the same page.
My question is are these IDs meant to be opaque or is there a way to convert them to the correct corresponding API IDs (short of browser scraping)?
Unfortunately, it's not possible at this time. In comments and notes (basically, anywhere in Asana that Rich Text is possible), we represent users as the URI to their "My Tasks" page, which is different from their User ID (as you noticed).
We are exploring ways to close this gap, but don't have anything to share at this time. I know that's not super helpful, but I hope it at least helps to have a definitive answer :-(

Google+ Authorship: #REL, GET Parameters and Redirects

I recently decided to start to take advantage of rich snippets to improve my personal website's content for the search engines and, IMHO most importantly, the site readers – hi, Mam! ;-). One of these are Google Authorship. Personally, I think the idea behind Google Authorship is a sound one: it helps to brings a sense of identity, personality and – arguably, most importantly – credibility to what is still largely an anonymous web.
Normally, I would link my article to Google Authorship using the following line of HTML:
<A REL="author" HREF="https://plus.google.com/112431363835029530079?rel=author">Jordan Clark</A>
However, in the instance of a website that publishes articles that are written by multiple authors, manually entering each another’s Google+ UID string starts to become a tiresome process.
Is is valid to do the following:
(a) Link to the author like so, using the script "author.php" (or other type of server-side script).
<A REL="author" HREF="/author.php?by=Alice&rel=author/[UID]?rel=author">Alice</A>
(b) The file "author.php" scripts simply do a quick check for Alice's (or whoever) User ID string provided by Google, and then uses a simple HTTP redirect header to pass this data to Google.
What I would like to know is:
Is it okay to use a local script to redirect to your Google+ user profile? (i.e. will it affect the PageRank of already indexed page or have any other unforeseen negative effects on new and indexed pages?)
Why do I not see more people linking with Google’s “prettified” version:
http://profiles.google.com/clarky.y2k?rel=author
Are there any drawbacks to using the “prettified” version of this method?
Ideally, I would like to use the intermediate PHP script, as I have already described above (see part 1). However, any tips, suggestions or other ways you may have implemented on your websites are very welcome!
For item (1), you can maintain your own app's profiles (author.php in your case) for your authors. On your own app's profile page (author.php), you would add a link from that page to Google and specify the rel="me" attribute on that link. So Alice's profile page might say something like "Find Alice on Google+.
This indirect authorship linking is supported. You also will need the link from Alice's Google+ profile that lists her as a contributor to your site. Once the linking is setup in both directions, authorship can start to show up. Authorship won't always display in all cases and can take some time for it to start appearing as Google would need to reindex your pages.
For item (2), I don't think the profiles URL will enable authorship. Some people use that URL as a vanity URL, but as far as I know it isn't supported for use with things like authorship, badges, etc.
You should test if your redirects are followed using the Rich Snippets Testing Tool: http://www.google.com/webmasters/tools/richsnippets
rel="author" is no longer supported.

How to get the follow suggestions from twitter?

On Twitter there is a page that lists some users that are suggested "Twitter accounts suggested for you based on who you follow and more." from this link: https://twitter.com/i/#!/who_to_follow/suggestions
I didn't find an API to retrieve the same list (maybe I am missing it?).
Does anybody knows how that list can be accessed? (other than parsing the html)
The good thing about that list, is that it is not categorized and it does contain common people (ie. not sport/cinema superstars etc.)
I think this can be achieved in two steps by twitter API. Seems like first you need to get the categories that twitter suggested to user, then from those categories you can get the suggested users to the authenticated user.
https://dev.twitter.com/docs/api/1.1/get/users/suggestions
https://dev.twitter.com/docs/api/1.1/get/users/suggestions/%3Aslug

Display a list of twitter accounts with twitter controls/info

I have some lists of twitter accounts that I would like to recommend on my website (e.g. follow these great crafting bloggers). If I have the twitter ID for each of these people, is it possible to create a list of items that show their twitter info (pic, number of tweets/followers, etc.) as well as controls that allow the user to follow each (or multiple) twitter account? I'd like to be able to do it dynamically based on the list of accounts so that I can update the list and not have to redesign the page. I feel like I've seen this around the web before, but I don't see any widgets for doing it and I'm wondering how it's done.
(I would like to use javascript/jquery, but am pretty flexible here)
Thanks!
Jeff
I would first look at the Twitter API. You will find more information on how Twitter works, and you may find information applicable to what you want to accomplish on your website. It's a start, and there's no better place to start than the source itself.

Resources