Is there a way to increase counter in mysql database whenever somebody share an article on my website using addthis button? - share

In my website, i want to keep track of each share made, using addthis share button.
So is there a way to track the counter and save it in my mysql database. So that I can sort out the article with the maximum number of shares??
Thanx.

One way you can find the article with the most shares is through AddThis analytics. You can login to addthis.com and view the analytics or you can get shares by content or the top shared content through an API:
http://support.addthis.com/customer/portal/articles/381264-addthis-analytics-api#.Uu0jP3ddWTM
And then lastly, if you want to know when shares occur in real-time, there's an event api that you can use to listen for a share and then do an ajax call to your own server to track the share:
http://support.addthis.com/customer/portal/articles/1365497-addthis-javascript-events#.Uu0jmHddWTM
And look for the addthis.menu.share event. Hope this helps.

Related

Sharethis Share Count Increases without share

I am using share this in my portal and I noticed that share counts ( http://prntscr.com/7ut1yk ) are increasing only on the click and it still keep the same count if user doesn't share the article.
I want that it should be real shares. I have already tried nativeCount: true but doesn't help
Any Suggestions
I posted a query on shareThis forum and got their response as
Hi,
ShareThis uses its own mechanism to calculate shares and clickbacks.
When somebody clicks on the ShareThis button, a count call has been initiated and the count on the buttons increases at the same moment, it is the basic functionality of the ShareThis buttons. Here, the user has an intent of sharing the data and hence he has clicked the button, but if he cancels the sharing, the counter never goes back as the count call which is initiated earlier has already being tracked by the Analytics Dashboard.
Hope this clarifies.
If you wish to implement native counter buttons (available right now for Facebook, LinkedIn and StumbleUpon), you can make changes in your ShareThis code as shown below -
stLight.options({ publisher: 'PUBKEY', nativeCount: true });

Share image including some attributes (e.g. description) on Facebook over web without app validation hassle

I want to share an image from a website on Facebook and pass some attributes (e.g. a description) to the status update, all done by clicking on a link.
A few months ago this worked fine using the sharer.php but by now this script just accepts a URL as parameter and scrapes the target site for Open Graph meta tags. This new approach isn't very helpfull if you just want to share elements on a page instead of the whole page.
Yeah, I could create an app and use the feed dialog to achieve my goal. But I honestly don't want to walk through the tedious app validation process just to share an image with some additional info!
So, does anyone know of a way to avoid this app hassle? Perhaps some undocumented parameters for the new implementation of the sharer.php?
There's no need for app validation - as #CBroe correctly stated! So the feed dialog IS an adequate solution!
Background: I assumed an app needs validation to go live. But I just didn't set up my app properly to make it available to every Facebook user.
See the comments to gloat over my stupidity. ;)

Creating an event link on a wall (publish event)

I'm currently trying to create an application, which allows me to post links to group walls.
At the moment it is already working and does create working links like a charm :)
My problem now is the following: I want to share fb events. If you only share a normal link (for example http://www.deviantart.com), fb perfectly gets the metadata out of the link an creates a correct preview.
But if i add a facebook event, it doesn't work correctly. It just creates a link (with matching title) without a preview or additional information. I want it to create the "normal" shared event preview. with date, location, preview, attending and the possibility to attend to the event by just clicking on the preview button.
My goal is to get the same behaviour as when you manually copy and paste a facebook event url
I'm using the graph api
I just can't figure out a way to do that.
Where do u want to share the events ?
have u look at this FAQ developers facebook ?
Here is a PHP solution, dont know if U are working in PHP, but its a great ex. PHP EX.

Share bought products from order on buyer's Facebook wall

The company I'm currently working for wants to create a button that lets people share their order on Facebook after they've paid, but with the deprecation of the "Share" button I don't really know how to do it.
The "Like" button does not seem fit for this. Any ideas, anyone?
There are a few ways to go about this.
You can use the standard sharer. This is good for one-off sharing or in cases where you don't have control or don't want to control how the share is rendered and you want Facebook to handle it.
http://www.facebook.com/sharer.php?u=<url to share>&t=<title of content>
It won't require you to have an app ID but you also won't get a nice control panel for your applications sharing history/insights. You can query and get some information about the URL your sharing though by looking through the open graph.
I.E
https://graph.facebook.com/?ids=http%3A%2F%2Fwww.cnn.com
https://graph.facebook.com/comments/?ids=http%3A%2F%2Fwww.cnn.com
You can set the URL and Title of the content. The sharer will then look at the metadata on the webpage your sharing to determine the contents of the share. More below.
You can also use the Feed dialog. Which comes with more customization options. The Feed dialog is the best option if your integrating sharing as an integral part of the application. I think at minimum you need to include the app_id,redirect_uri and link property. Look through the properties here. You will need an app ID to use this feed dialog and if your using the JS api you need to authenticate the user too. You can also invoke the dialog directly through a direct url where you don't need to pre-authenticate the user.
With either sharing method, you may wish to include custom open graph metatags on your webpage. This way you can influence how the Facebook scraper makes your share. You can set some default (pre-accepted by Facebook) open graph metatags on your page. Or you can create your own set now in the dashboard. In the Open Graph dashboard on Facebook you can customize how Facebook is supposed to read and interact with your metatags.
You can debug your pages open graph metatags by passing your URL through the debugger.
I.E
http://developers.facebook.com/tools/debug/og/object?q=www.cnn.com
This will give you, for example, JSON or an HTML representation of how FB sees the page.

How to get insights for separate "Like" button(s), not for whole domain

I have put a like button on my web page which is dynamically linked to different Facebook fan pages. I have checked the insights pages of Facebook but it gives an overall count of button clicks from my site. Is there a way to get more detailed information like how many users clicked which Like button?
Facebook documentation mentions a ref tag that can be added to Like button code, however this tag does not show up in insights reports. Also I know I have the chance use JavaScript events to handle reporting personally, but I cannot since I am using iframe version of the button.
Also, is there a way for the Facebook fan page admin (the one that my like button links to) to see that detail exactly? e.g. "xx number of clicks generated with like button from this site (or app--which the like button is tied ?)"
In my opinion, Facebook insights are far from being complete.
If I where you, I would track like events, and visits from like using an analytic tools like Google Analytics. This is what I do for my website, and the website of the company I am working for.
However, Facebook insights can give you complementary metrics (age, gender...).
Regards
Antoine
As Antoine says, you can track your likes with Google Analytics. I don't know about insights though.
Here's more info on how to track likes with GA:
http://www.socialmediaexaminer.com/how-to-track-tweets-facebook-likes-and-more-with-google-analytics/
Use FB.Event.subscribe:
FB.Event.subscribe('edge.create',
function(response) {
alert('You liked the URL: ' + response);
}
);
Why use iframe if it is limiting you from doing what you need to do? Use XFBML or HTML5 versions and use the event handler to do an AJAX call to your server. Kinda like, Dr it hurts when I hit my thumb with a hammer, and the Dr says don't hit your thumb.