How do I add a referral variable to an AddThis URL without resetting the count? - addthis

for my project I need to be able to add a referral variable (something like ?ref=xxxx) to URLs shared via AddThis.
However, by adding the variable and changing the URL, the "count" displayed on the tool resets .
So does anyone out there have a solution to use AddThis to share URLs with variables on them, without resetting the "count" displayed to the user?
Thank you all so much for your time!

I had a similar problem.
So, you can use fb_ref parameter: https://developers.facebook.com/docs/reference/plugins/like/
In the AddThis you need to use the following format: fb:like:fb_ref
AddThis Support ticket: http://support.addthis.com/customer/portal/questions/1127049-facebook-data-ref

You can do this via the ref attribute on the Like button. See the ref attribute here: https://developers.facebook.com/docs/reference/plugins/like/
However, I'm currently looking for how to implement this via AddThis. I'll post here if/when I find a solution.

Related

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

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>

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.

Facebook like button counting problem

I have installed facebook like button with javascript solution.
I left the href attribute empty so it will use the current url for counting. It seems that right now , even after changing the href attribute , facebook is counting the like on my entire website.
Example:
1. domain.com/fb_url
2. domain.com/fb_url2
If you will like the first url , you will be able to see the likes on the second url.
Why not putting into the href attribute the absolute URL of the page? I guess this will fix the issue. This can be easily achieved in whatever language you use. Please post the code you are using so that we can provide further help.
If you used og:url tag, you although have to change it on each page.

Facebook - serverfbml form action must be within the application's connect url

I am not sure, I am using a pretty standard piece of code for facebook. It sends requests for people regarding my application. All of a sudden I am receiving this error:
serverfbml form action must be within
the application's connect url
Have you been having problems with using either one of these:
fb:serverFbml
fb:request-form
fb:req-choice
fb:multi-friend-selector
thank you!
I don't know if you managed to find a solution yet, but I will tell you what my solution is. The action attribute of your forms should NOT be relative URLs, that is you should give the full URL of the website where the application is hosted:
fb:editor action="http://www.mydomain.com/myapp/index.php?params=1" labelwidth="100"
Use the canvas URL under Facebook Integration section in your application's edit mode.
If your canvas URL looks like this:
http://www.example.com/myfacebookapp/
then, in server fbml form action, the URL MUST be in the same directory of your canvas, like this:
(using the example of
<fb:request-form action="http://www.example.com/myfacebookapp/somepage.html"
Also, if the whole contains blank spaces i.e.
http://www.example.com/myfacebookapp new/
consider eliminate that blanks, or use %20 instead of the blank when you specify the URL canvas on Facebook and when you use that URL in form
<fb:request-form action="http://www.example.com/myfacebookapp%20new/somepage.html"
I solved it finally.
Dont get messed up with all type of setting.
Simply go to your facebook app
click edit app button
now copy Canvas URL
and paste it under
<fb:request-form action="CANVAS URL HERE"
method="POST">
Well, it worked for me.!
Thanks to "tsegaye"
i had the same issue.. i used the canvas url in the summary page and it worked. You can try it out aswell
This is not the solution. If you do this, when user clicks "skip" on the dialog, he would be send to http://www.mydomain.com/myapp/index.php?params=1" instead of your application.
The solution is:
action="http://apps.facebook.com/myapp/" -> this "/" at the end would help.
It could be also any other action inside your app for example:
action="http://apps.facebook.com/myapp/sendRequest"
This solution works if you use friend selectors outside the scope of sending requests. For eg. Selecting friends to collaborate with in your app.
Not an answer but this is what helped me. I have a iframe based application and i tried to use the facebook iframe based friend invite code. In my action, i put the app.facebook.com/myapp/ url which whould be give me this fbml error
serverfbml form action must be within the application's connect url
Also when i pressed "skip" it would take me to a 404 error. The solution was to use the canvas url under facebook integration, as suggested by #tsegaye