Giter Club home page Giter Club logo

sharecount's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sharecount's Issues

Is there a WordPress plugin using this code?

Is there a WordPress plugin using this code? That can place it in a sidebar widget.
If not and I was to create one would there be any issues with that?

Plus it possible to wildcard a website and bring back the top 10?

Error: No URL specified.

require("share_count.php");
$count = new shareCount;
echo $count->get();

this gives me

Error: No URL specified.

Getting Parse and Syntax Error After Uploading The Donreach Plugin

Hi,

First of thank you so much for open sourcing such precious scripts and letting everyone to use it for free. This surely requires a big heart. =)

I tried uploading the plugin scripts and files on a sub-domain located at http://count.mybloggertricks.com/

I also created a separate Mysql database and changed the config.php values to

/* database settings - only required to track shares */
public $db_type = 'mysql';
public $db_host = 'localhost';
public $db_name = 'mustafa_shares';
public $db_user = 'mustafa_shares';
public $db_pass = 'mypass';

But I am getting the following error on visiting the URL.

Parse error: syntax error, unexpected ':' in /home1/mustafa/public_html/count/share_count.php on line 37

There looks to be some syntax errors in the share_count.php file.

Am I doing something wrong. Would appreciate the slightest of help here.

site is echoed

    $count = new shareCount;
    $count->url = 'http://www.abc.com/';

    $obj = json_decode($count->get());
    $totalSocialShares = $obj->shares->total; //total social shares

this code when run, echo's my whole pages source code.

public $format = 'json';            // 'json', 'jsonp' or 'xml'

how to get it to just return the json of the shares?

i did this for a fix, not sure its the right way.

i added

case "html":
                $this->format = 'html';
                //header ("Content-Type:text/xml"); 
                break;

to the setFormat() function

and in my config.php

public $format = 'html';            // 'json', 'jsonp' or 'xml'

WordPress Loop

Is there a simple known method of using this script in a loop, so that a blog index page populated with post excerpts could also include the count?

Ta

Not working at all ...

I uploaded a fresh copy on my server and only un-commented the following 2 lines in index.php

$shares = $count->get('http://abemedia.co.uk');
print_r($shares);

And all it keeps showing is - Error: No URL specified.

Count shares

API function to count shares and store to mysql

Multiple url

Can it be updated to get all pages on a domain as a example
I have 8 pages that I share that I would like to get the combined share total

var shareUrl = 'http://carrsdigital.net/';
var shareUrl = 'http://carrsdigital.net/Dare2BeNaughty/';
var shareUrl = 'http://carrsdigital.net/Dare2BeNaughtyBoudoir'
var shareUrl = 'http://carrsdigital.net/DesignerArtBooks/OohLaLa/';
var shareUrl = 'http://carrsdigital.net/DesignerArtBooks/StylusMag/';;
var shareUrl = 'http://carrsdigital.net/DesignerArtBooks/Casablanca/';
var shareUrl = 'http://carrsdigital.net/DesignerArtBooks/WhatIsSexxy';
var shareUrl = 'http://carrsdigital.net/DesignerArtBooks/Leather&Lace';

Can you please help with this?
Thank you

Output Facebook Likes, Comments, Clicks & Shares Seperate as well

This is a great Library, For facebook it uses the Total Number of Shares, Likes, and Comments which is good for some things.....

For my purposes however I need the total count AND the numbers separated. For example if I send the URL:

http://nba.com/warriors/gameday/20160522/recap

To your Script at: https://count.donreach.com/?url=http://nba.com/warriors/gameday/20160522/recap

it Returns:

{
"url": "http://nba.com/warriors/gameday/20160522/recap",
"total": 16797,
"shares": {
"facebook": 16797,
"google": 0,
"linkedin": 0,
"pinterest": 0
}
}

If we send it Directly to the Facebook API Graph at: https://api.facebook.com/method/links.getStats?format=json&urls=http://nba.com/warriors/gameday/20160522/recap

we get:

[{"url":"http:\/\/nba.com\/warriors\/gameday\/20160522\/recap","normalized_url":"http:\/\/www.nba.com\/warriors\/gameday\/20160522\/recap","share_count":117,"like_count":15815,"comment_count":865,"total_count":16797,"click_count":0,"comments_fbid":"991016050996638","commentsbox_count":11}]

Your script Returns only the "total_count". Could the script be changed to return at least for Facebook all the important additional parameters like shares separated from likes and comments like so:

{
"url": "http://nba.com/warriors/gameday/20160522/recap",
"total": 16797,
"shares": {
"facebook": {
"total_count":16797,
"commentsbox_count":11,
"click_count":0,
"comment_count":865,
"like_count":15815,
"share_count":117
},
"google": 0,
"linkedin": 0,
"pinterest": 0
}
}

What changes would be needed to do this?

Delete cache on share

Create new API function 'share' which deletes cache then forwards to relevant share url.

Wrong Google+ share counting

Hey, Google+ shown the Wrong share counting 1 share count = shown 11 shares 2 shares - count as 22 shares
how to fix this?
I host this share count on Openshift

Not save data in DB

I'm not able to save in DB, my config is:

<?php
class Config {

    /* global cache settings */
    public $cache = '';          // 'memcache', 'apc' or 'file' - leave blank to disable caching
    public $cache_time = 86400;  // in seconds e.g. 86400 = 24h

    /* memcache settings - only required if cache set to memcache */
    public $cache_server = 'localhost';
    public $cache_port = 11211;
    public $cache_persistent = true;

    /* filecache settings - only required if cache set to file */
    public $cache_directory = './cache/'; // needs trailing slash!

    /* database settings - only required to track shares */
    public $db_type = 'mysql';
    public $db_host = 'localhost';
    public $db_name = MYDBNAME;
    public $db_user = MYUSER;
    public $db_pass = MYPASS;

    /* default output settings - ignored if url parameter has been passed */
    public $format = 'json';              // 'json', 'jsonp' or 'xml'
    public $callback = 'processShares';   // default jsonp callback function name

}

I make test of conection in my DB, with my data, and is all correct, but I'm not able to save shareds in DB, any help?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.