How to mention another user on Confluence through the REST API? - confluence

I am trying to insert a mention in a confluence page through the REST API.
I tried placing the [~xxxx] in the middle of the content but it doesn't seem to work. When I open the page I see [~xxxx] instead of a link to the mentioned user.
I placed that string in the body>storage>value
I have tried also with <ri:user ri:userkey="xxuserkeyxxx"/> but, in this case, I do not see anything on the page.
Any ideas?
Thanks a lot.
Found the reason why wasn't working, it needs to be:
<ac:link><ri:user ri:userkey="xxuserkeyxxx"/></ac:link>
I was missing the ac:link tag. After adding it, works fine. I wasn't able to find it on the official doc: https://confluence.atlassian.com/doc/confluence-storage-format-790796544.html

You need to use a link with the content being the user's user key
<ac:link><ri:user ri:userkey="f081435773s808c3014357744847024c" /></ac:link>
If you ever need to figure out the correct syntax for storage format:
edit a page and, in this case, #mention someone
go to the "..." menu and View Storage Format to see the result.

ri:userkey is deprecated. Instead use account-id.
<ac:link><ri:user ri:account-id=<accountId> /></ac:link>

Related

TYPO3 News Extension Pagionation doesn't work

I use the news extension in TYPO3 and so far it's almost fine.
The only problem I have is the pagination. If I click e.g. on the pagination page 2, the link get some extra string like &tx_news_pi1[%40widget_0][currentPage]=2 but the outcome is always the same like on the first page. So do I have to do something in the settings to get this working or does anyone of you have an idea where the mistake could be?
I looked up at github and google but couldn't find any helpful information for my problem which is kind of unbelievable...
Another thing is I would try to do an AJAX pagination when it's working. I saw the topic on the TYPO3 site (https://docs.typo3.org/typo3cms/extensions/news/AdministratorManual/Templates/AjaxBasedPagination/Index.html) and followed the instructions of installing typoscript_rendering, inserting the list plugin as content element, changed the template path and inserted the js.file. But the thing here is when I set the template path to the indexAjax.html I get the following error
Undeclared arguments passed to ViewHelper GeorgRinger\\News\\ViewHelpers\\Widget\\Ajax\\PaginateAdditionalParamsViewHelper: page
When I look in the AjaxPagination.js given by link above the variable ajaxUrl is always undefined, because it wants to grab the data which causes the error message above I think. Hopefully somebody of you can hint me to the right solution..

Embed API demo not working

I tried using this Google Analytics Embed API Demo, of course with my own ClientID (49803909):
Embed API Demo
However, instead of the graphic I should be getting, I only get a blank page. I did follow the instructions quite carefully. Does this work for others? Any ideas of what may be wrong?
PS: Here's the screenshot of where I am getting the id from. #DaImTo was right that just 49803909 wasn't it, but I also tried to full long string and even the service id below (the one with #), all to the same effect (a blank screen). So, is this the wrong screen then?
I think #DalmTo is correct. You're most likely using one of the many other Google Analytics IDs instead of using a valid Client ID (which is not Google Analytics-specific, it's a general ID used for accessing Google APIs), and you're probably getting errors logged to the JavaScript console that say something to that affect.
If you follow the steps in this Embed API Developer Guide, you'll see instructions on how to create a Client ID to use with the Embed API.

Facebook share ignores custom query string parameters

I try to share an URL that contains query parameter in FB.
Here is my share link
Sharing works but my custom query parameter is gone and replaced with facebook query parameters in the facebook timeline something like here
The same problem when FB.ui({ method: 'share',... is used.
It worked well on previous version of facebook sharing sharer.php but it's deprecated now and I have no idea how to make current share work.
We faced same problem. We instead used Feed Dialog that works fine. The irony is that if you read on facebook's developer's site Facebook is recommending us using Share Dialog in place of Feed dialog however, Share dialog does not work as expected.
Here is the link to get more information on Feed dialog
https://developers.facebook.com/docs/sharing/reference/feed-dialog/v2.2
Personally i like Feed dialog more the share cause it gives you some additional properties to manage how dialog should appear
i assume you solved your problem in a different way already but i have found a solution for this. Just in case somebody else comes across this question.
Facebook strips the parameters only when it is more or less sure that the file is an php file.
So for http://example.com/?test=1
or http://example.com/index.php?test=1
the parameters are removed.
But if you make it look like a normal html file, it works:
http://example.com/whatever.htm?test=1
for example is posted with the parameters.
Of course you can use some simple mod_rewrite Rule to redirect the request to the original php file:
RewriteRule /whatever.htm(\?.*) /index.php%1
(rule is untested but should work hopefully)

Tumblr share url

I've came across this page https://www.tumblr.com/examples/share/sharing-links-to-articles.html which shows a possible way to customly create a share URL for tumblr.
Simplified version of what they have:
Click to share
http://jsfiddle.net/m5ow6bhs/2/
This will take you to the log in page or straight to the share page if you're already logged in. However, if you change the http%3A%2F%2F part to a simple http:// it will now load to a "Not Found Page". http://jsfiddle.net/m5ow6bhs/3/ What the hell Tumblr?
Do you guys have any idea what's going on or what's the correct code to share something to Tumblr?
Cheers.
As with most share services, the URL should be passed as an encoded string. This supports the OPs comments about http%3A%2F%2F(encoded) and http:// (raw).
Tumblr provides variable transformations in the theme operators to handle encoding, but sadly it doesn't work with custom variables.
One quick solution is to drop the http:// part. Example: http://jsfiddle.net/L9jd8dhz/
I have discovered as of recently that the share URL needs to be updated as such:
https://www.tumblr.com/widgets/share/tool?shareSource=legacy&canonicalUrl=<-urlencode(share_url)->&posttype=link
The &posttype= seems to be a new requirement to make the share work correctly.

Tab links using only the page and app_id has stopped working, is there an alternative beyond querying Facebook each time?

A few days ago these type of links worked: http://www.facebook.com/pages/132456789?sk=app_132465798465 but now they give 404's.
The alternative is link to the namespace of the page like so: http://www.facebook.com/pages/foo/1456798324564?sk=app_134654689794 however to find out the link I'd need to ask Facebook for it, and it seem like since the namespace can change I can't just ask for it once.
Is there another way to use page and app id's to link to tabs without needing the roundtrip to Facebook?
I don't think that first format was ever used on Facebook, i'm surprised it worked.
As far as I can tell the 'name' part of a page URL is arbitrary, so just filling in something there will work, e.g.
http://www.facebook.com/pages/Tea/194040780316?sk=info
will also work as
http://www.facebook.com/pages/some_random_text/194040780316?sk=info