Git Product home page Git Product logo

shariff-backend-php's People

Contributors

art4 avatar cmb69 avatar compeak avatar core23 avatar digitalgopnik avatar erkenes avatar ipa01 avatar kriskbx avatar lbehm avatar liayn avatar markusschwarz avatar neoblack avatar onli avatar ooxi avatar pmb0 avatar reiz avatar richard67 avatar sehkunde avatar uwej711 avatar vkhramtsov avatar wmtech-1 avatar xiut avatar yanniks avatar

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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

shariff-backend-php's Issues

empty facefook response

hi,
I've observed that sometimes I get an empty facebooks response, which leads to an php-warning in Facebook.php ( invalid offset ). Added code to function "extractCount" to clean this:
if (!isset($data[0]))
$data[0]['share_count'] = 0;

setCacheDir no Exceptions on Server

Wenn meine CacheDir auf einer Lokalen Installation (xampp) falsch ist bekomme ich eine Exception, jedoch hab ich keine auf einem richtigen Server bekommen. Deshalb musste ich ein paar Echos einbauen. Vielleicht hilft das ja ein paar Leute die ebenfalls einen 500 Error bekommen haben und keine richtigen Exceptions bekommen haben. Ich habe auf dem Server einen eigenen Cache Ordner benutzt, da es mit Default Einstellungen(system temp directory) nicht funktioniert hat(ebenfalls keine richtigen Exceptions nur 500 Error).

public function setCacheDir($cacheDir)
{

    if ($cacheDir !== null) {
        if (!is_dir($cacheDir)) {
            echo'cache dir not found';
            throw new Exception\InvalidArgumentException(
                "Cache directory '{$cacheDir}' not found or not a directory"
            );
        } elseif (!is_writable($cacheDir)) {
            echo'cache dir not writable';
            throw new Exception\InvalidArgumentException(
                "Cache directory '{$cacheDir}' not writable"
            );
        } elseif (!is_readable($cacheDir)) {
            echo'cache dir not readable';
            throw new Exception\InvalidArgumentException(
                "Cache directory '{$cacheDir}' not readable"
            );
        }

        $cacheDir = rtrim(realpath($cacheDir), DIRECTORY_SEPARATOR);
    } else {
        echo $cacheDir;
        $cacheDir = sys_get_temp_dir();
    }

    $this->triggerOptionEvent('cache_dir', $cacheDir);
    $this->cacheDir = $cacheDir;
    return $this;
}

version conflict with Symfony and psr/log

symfony 2.3 requires "psr/log": "~1.0" and 1.0.1 is the latest version, but shariff requires "psr/log": "1.0.0"

this broke our deployment yesterday.

img_2016-09-23 11 24 38

we currently force "psr/log": "1.0.0" so that we can continue deployment but it would be nice to have following updates of "psr/log"

Add CA Cert bundle for SSL-connections to facebooks and co.

There’s a whole lot of misinformation about how to deal with the error “SSL certificate problem, verify that the CA cert is OK” from curl. Nearly everyone advises that you turn CURLOPT_SSL_VERIFYPEER off (in fact, countless comments on the PHP manual page for curl_setopt tell you this). This is bad, because it allows your nice, encrypted stream of confidential data to be silently highjacked by a bad guy (e.g. look for "man-in-the-middle-attacks").

Sharif backend uses curl - but has not yet provided / implemented needed CA Cert bundle from the curl-website. (look at: http://curl.haxx.se/docs/caextract.html).
Implementation is quite easy:

  • Download CA Cert bundle
  • add option "CURLOPT_CAINFO" (e.g. in CurlFactory.php): $options[CURLOPT_CAINFO] = 'path-to-cacert-bundle/cacert.pem';

Facebook, Xing, LinkedIn - kein Counter mehr

Hallo!

Ich nutze erst seit Anfang August Shariff. Ich habe eingestellt, daß ich Buttons für Facebook, Twitter, Google+, LinkedIn, Whatsapp und Xing angezeigt bekomme. Anfang August war es so, daß ich bei Facebook, Google+, LinkedIn und Xing einen Counter angezeigt bekam, Twitter und WhatsApp dagegen wie bekannt ohne.

Nun erhalte ich aber lediglich noch eine Anzeige des Counters bei Google+. Facebook, LinkedIn und Xing werden nicht mehr angezeigt. Ab wann genau das Problem auftrat kann ich nicht sagen, aufgefallen ist es mir aber am 24.08.

Sind hier Änderungen an der Schnittstelle erfolgt und was kann ich nun zur Problemlösung machen? Bzw.: ist das Problem bekannt und wird an einer Lösung gearbeitet?

Vielen Dank.

Google+ showing 0 shares

In the latest release of shariff-backend-php (5.2.0) , the Google+ share count is broken (sending invalid requests to the Google API), due to the upgrade to Guzzle 6.

The easiest fix would be to continue using Guzzle 5.

PHP7 Compatibility?

There are a lot of potential issues with PHP 7 (which will be released very soon). Can we expect to have those checked (and if necessary corrected) soon?

Thanks!

/vendor/guzzlehttp/guzzle/src/Message/AbstractMessage.php

  • foreachByReference
    • Line 78: foreach ($value as &$v) {

/vendor/guzzlehttp/guzzle/src/UriTemplate.php

  • foreachByReference
    • Line 152: foreach ($kvp as $k => &$v) {

/vendor/guzzlehttp/guzzle/tests/Message/FutureResponseTest.php

  • funcGetArg
    • Line 120: $err = func_get_args()[1];

/vendor/guzzlehttp/guzzle/tests/Message/MessageParserTest.php

  • foreachByReference
    • Line 241: foreach ($normalized as $key => &$value) {

/vendor/guzzlehttp/guzzle/tests/perf.php

  • yield
    • Line 33: yield $client->createRequest('GET', '/guzzle-server/perf');

/vendor/guzzlehttp/ringphp/src/Client/CurlFactory.php

  • funcGetArg
    • Line 429: $args = func_get_args();

/vendor/guzzlehttp/ringphp/src/Client/StreamHandler.php

  • funcGetArg
    • Line 304: $passed = func_get_args();

/vendor/guzzlehttp/ringphp/src/Core.php

  • funcGetArg
    • Line 22: $args = func_get_args();

/vendor/guzzlehttp/ringphp/tests/Client/CurlFactoryTest.php

  • funcGetArg
    • Line 298: $called[] = func_get_args();

/vendor/guzzlehttp/ringphp/tests/Client/Server.php

  • foreachByReference
    • Line 75: foreach ($result as &$res) {

/vendor/guzzlehttp/ringphp/tests/Client/StreamHandlerTest.php

  • funcGetArg
    • Line 319: $called[] = func_get_args();
    • Line 334: $called[] = func_get_args();

/vendor/guzzlehttp/ringphp/tests/CoreTest.php

  • funcGetArg
    • Line 192: $called['a'] = func_get_args();
    • Line 195: $called['b'] = func_get_args();

/vendor/guzzlehttp/streams/src/Utils.php

  • funcGetArg
    • Line 30: func_get_args()[1]

/vendor/react/promise/tests/PromiseAdapter/CallbackPromiseAdapter.php

  • funcGetArg
    • Line 13: return call_user_func_array($this->callbacks['promise'], func_get_args());
    • Line 17: return call_user_func_array($this->callbacks['resolve'], func_get_args());
    • Line 21: return call_user_func_array($this->callbacks['reject'], func_get_args());
    • Line 25: return call_user_func_array($this->callbacks['notify'], func_get_args());
    • Line 29: return call_user_func_array($this->callbacks['settle'], func_get_args());

/vendor/zendframework/zend-cache/src/Pattern/ObjectCache.php

  • funcGetArg
    • Line 251: return $this->call('__invoke', func_get_args());

/vendor/zendframework/zend-cache/src/Storage/Adapter/Apc.php

  • foreachByReference
    • Line 378: foreach ($normalizedKeyValuePairs as $normalizedKey => &$value) {

/vendor/zendframework/zend-cache/src/Storage/Capabilities.php

  • foreachByReference
    • Line 202: foreach ($datatypes as $type => &$toType) {

/vendor/zendframework/zend-cache/src/Storage/Plugin/Serializer.php

  • foreachByReference
    • Line 72: foreach ($result as &$value) {

/vendor/zendframework/zend-json/src/Server/Server.php

  • funcGetArg
    • Line 73: $argv = func_get_args();
    • Line 111: $argv = func_get_args();

/vendor/zendframework/zend-stdlib/src/ArrayUtils.php

  • foreachByReference
    • Line 175: foreach ($haystack as &$h) {

/vendor/zendframework/zend-stdlib/src/CallbackHandler.php

  • funcGetArg
    • Line 130: return $this->call(func_get_args());

cache directory not cleaned

seems that design of php-backend has no functionality to clean obsolete/expired cache-entries in cache-directory. Can somebody clarify this issue?

Add required PHP-version to Documentation

I think it says somewhere in the German article that PHP 5.4 is required for this to work but I don't find a reference in the README.md

Would safe a lot of people a lot of disappointment

Verständnisproblem

Hallo werte Gemeinde,

ich habe ein paar Verständnisprobleme und hoffe auf eure Hilfe!

Zum Testen des Backends!

  1. Muss dazu auf meiner Webseite der Frontend-Code
    <span class="shariff" data-theme="grey" data-lang="de" data-services="[&quot;facebook&quot;]" data-backend-url="/my-shariff-backend/" ></span> vorhanden sein, wenn ich erstmal nur testen will ob http://meine-Domain.de/my-shariff-backend/ überhaupt funktioniert?

  2. Muss zum Testen in der JSON meine Webadresse drin stehen oder kann ich auch eine andere Webseite von mir angeben, welche bereits Facebook-Fans hat, bzw. geteilte Inhalt ... oder z.B. heise.de

  3. Ich habe kein PHP5.5 und habe somit in meinem Ordner "my-shariff-backend" eine htaccess anegelegt und diese mit Hilfe von "AddHandler php56-cgi .php" manipuliert .. hat da jemand Erfahrungen ob das Einschränkungen mit sich führt?

a) Muss ich eine "Blanko"Facebook-App erstellen um an AppID und Secret ran zu kommen?
b) Muss diese App Online sein oder reicht es wenn ich die AppID und das Secret habe und eingebe
c) kann ich mit diese "Blanko"Facebook-App den Service dieses Scriptes auf mehreren Domains nutzen

  1. Muss ich alles hochladen was sich im Zip befindet, also auch die Ordner **src _und _vendor?

Nun zu mein Problem:
Bei mir wird nur null angezeigt wenn ich http://meine-DOMAIN.de/my-shariff-backend/ aufrufe! Ist das normal oder muss da z.B: was anderes stehen?

Wenn ich folgendes Aufrufe:
http://meine-DOMAIN.de/my-shariff-backend/?url=http//meine-DOMAIN.de kommt auch nur null

Übrigens habe ich sogar schon alle Dateien und Ordern auf 777 gesetzt, trotzdem wird nichts in mein tmp reingeschrieben!

Muss ich den tmp-Order erstellen? Habe ich auch schon gemacht, direkt in den Ordner "my-shariff-backend" aber leider auch nichts!

Muss ich denn bei Adapter auch was eintragen?

So sieht meine JSON aus:

{
    "cache": {
        "ttl": 60,
        "cacheDir": "tmp/"
    },
    "domains": [
        "www.heise.de",
        "www.ct.de"
    ],
    "services": [
        "GooglePlus",
        "Facebook",
        "LinkedIn",
        "Reddit",
        "StumbleUpon",
        "Flattr",
        "Pinterest",
        "Xing",
        "AddThis"
    ]
}

Es würde mich freune, wenn man mir helfen könnte. ich habe schon etliches ausprobiert!

Vielen Dank

PHP-Error

Hallo,

ca. einmal pro Tag finde ich in meinem php-error.log folgende Einträge. Kann sich da irgendwer einen Reim drauf machen? Nicht das dies schlimm wäre, aber prinzipiell interessiert es mich doch zu verstehen, warum das auftritt.

PHP Fatal error: Uncaught exception 'RuntimeException' with message 'SplFileInfo::getMTime(): stat failed for .../Shariff-c8/Shariff-25ad73a4dbfa7d2bf839e2cb77ab6eed.dat' in .../shariff/backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/Filesystem.php:154
Stack trace:
#0 .../shariff/backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/Filesystem.php(154): SplFileInfo->getMTime()
#1 .../shariff/backend/src/Backend.php(41): Zend\Cache\Storage\Adapter\Filesystem->clearExpired()
#2 .../shariff/backend/index.php(57): Heise\Shariff\Backend->__construct(Array)
#3.../shariff/backend/index.php(63): Application::run()
#4 {main}
thrown in .../shariff/backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/Filesystem.php on line 154

Viele Grüße,
startef

Mehr als eine Domain nutzen können

Hallo,

shariff ist wirklich ein sehr gutes Tool und ich würde es gern in einem Projekt nutzen, in welchem über ein (eigenentwickeltes) CMS verschiedene Websites mit unterschiedlichen Domains verwaltet werden. Bisher habe ich keine Möglichkeit gefunden, wie man in der shariff.json mehrere Domains angeben kann. Für jede einzelne Domain ein separates shariff-backends einzurichten, treibt den Aufwand bei Updates aber sehr nach oben.

Gibt es denn die Möglichkeit mehere Domains mit einer shariff-backend-Installation zu nutzen resp. wenn nicht, könnte das nicht in das Script mit eingearbeitet werden?

Danke im Voraus / VG

Frank-André Thies

Facebook has problems with anchors and umlauts

If an url has an anchor attached (e. g. "#mytarget") or contains an umlaut facebook does not work. So all anchors should be removed form an url bevor requesting the counter of facebook. And may be umlauts can be converted too. I actually replaces all umlautes in my urls manually.

Test without anchor (facebook counter is displayed):
http://www.marchert.info/brd/dokumente/datenschutzhinweise.html

Test with anchor (facebook counter is not displayed):
http://www.marchert.info/brd/dokumente/datenschutzhinweise.html#social

Edit: The umlaut problem exists with all buttons.

Default installation leaks shariff.json with Facebook App secret

If you follow the installation instructions, shariff.json will be accessible by entering the URL in the browser, e. g. http://example.com/shariff-backend-php/shariff.json. This exposes the Facebook App secret if one was entered.

Fix: Bring awareness to this issue and give clear instructions on how to make shariff.json not readable.

Twitter support

Hi,

I am using the php-shariff together with the google+, linkedin and facebook integrations. For twitter, I used a self-coded hack which made use of a non-documented twitter API.

<?php                                                                                         
namespace Heise\Shariff\Backend;                                                              

class Twitter extends Request implements ServiceInterface                                     
{                                                                                             

    public function getName()                                                                 
    {                                                                                         
        return 'twitter';                                                                     
    }                                                                                         

    public function getRequest($url)                                                          
    {                                                                                         
        $twitterUrl = 'https://cdn.api.twitter.com/1/urls/count.json?url=' . urlencode($url); 
        return $this->createRequest($twitterUrl);                                             
    }                                                                                         

    public function extractCount($data)                                                       
    {                                                                                         
        return $data['count'];                                                                
    }                                                                                         
}                                                                                             

However, this API has never been officially supported by twitter and now seems to be completely shut off. An official solution to this would be great (-:

Could you please tag 1.4.0

or is there something not to tag the new version (currently only 1.2.0 is available for installation with composer)

Facebook share count always zero?

We currently get always zeros for facebook share counts, when using the method the facebook backend uses. If I use the graph api id method (which needs an access token to work, I get the actual share count.

Anybody else observed something similar? I can try to do a PR but the method mentioned above needs an facebook appId and secret that needs to be configured.

https://graph.facebook.com/v2.2/?id=http://www.heise.de/&access_token=...

{
   "og_object": {
      "id": "419033995599",
      "description": "News und Foren zu Computer, IT, Wissenschaft, Medien und Politik. Preisvergleich von Hardware und Software sowie Downloads beim Heise Zeitschriften Verlag.",
      "title": "IT-News, c't, iX, Technology Review, Telepolis",
      "type": "website",
      "updated_time": "2015-01-11T17:55:57+0000",
      "url": "http://www.heise.de/"
   },
   "share": {
      "comment_count": 0,
      "share_count": 9445
   },
   "id": "http://www.heise.de/"
}

https://graph.facebook.com/fql?q=SELECT%20total_count%20FROM%20link_stat%20WHERE%20url=%22http://www.heise.de%22

{
   "data": [
      {
         "total_count": 5565
      }
   ]
}

New release / tag

Could you please create a new release or branch alias (4.0.x-dev) to get rid of old zend dependencies.

short array syntax

the used short array syntax will only work as of php 5.4+
should be changed to array() for versions prior to 5.4

Überflüssige Dateien und Ordner entfernen.

Schön wäre eine entschlackte Version des Builds. Allein der Docs Ordner in guzzle sind bei mir ca. 400kb. Ich schätze mal, das wenn man einige der überflüssigen sachen entfernen könnte, man die hälfte der ursprünglichen Dateigröße hätte.

backend doesn't work / error in apache-log / is this a bug

Hi,
we have a serious issue.
The backend doesn't work.
We installed it the backend as described.
If we call the test link (with the browser) how is described we get an browser indicator sign (waiting for domain)
This is lasting for about 4 minutes.
Then we got a jason message on the screen:
{"googleplus":0,"facebook":127,"linkedin":0,"reddit":0,"stumbleupon":0,"flattr":0,"pinterest":0,"xing":0,"addthis":0}

In the apache-error-log we have the following message:
[Thu Jan 28 14:41:xx.504204 2016] [:error] [pid 2878] [client 84.148.yyy.xx:57968] PHP Fatal error: Uncaught exception 'Zend\Config\Exception\RuntimeException' with message 'Decoding failed: Syntax error' in /var/www/shariff/instanz01/vendor/zendframework/zend-config/Zend/Config/Reader/Json.php:50\nStack trace:\n#0 /var/www/shariff/instanz01/index.php(21): Zend\Config\Reader\Json->fromFile('shariff.json')\n#1 /var/www/shariff/instanz01/index.php(26): Application::run()\n#2 {main}\n thrown in /var/www/shariff/instanz01/vendor/zendframework/zend-config/Zend/Config/Reader/Json.php on line 50, referer: http://test.xxxx.de/yyyy/zzz.html

What is the error and how to fix it?
Is this a Bug?
Is the file shariff.json wrong?

thanks for help.

Testing low and high dependencies

Sadly, the my PR was reverted :( So I wanted to start a general discussion.

IMHO only testing the composer config of the last contributor (specified in the composer.lock file) is a bad idea. Instead we should test the latest and lowest stable version that is currently available. This is the only way we could find bugs introduced by internal changes in external libraries we use.

I know, that there is no way to test ALL possible version, but testing the locked version wouldn't help either.

  • What if the contributor didn't update his vendor libraries for a long time? We would stuck on old deps and wouldn't find bugs in newer version
  • What if the contributor used a new method of an external library and didn't update the composer.json file? Someone who used the lowest possible version would get exceptions.

Other popular projects test the lowest and highest version too, such as symfony (https://github.com/symfony/symfony/blob/master/.travis.yml#L94)

Angabe von app_id und secret in der shariff.json

Hallo,

eine Frage: Wie genau lautet die Syntax der Angabe von der Facebook app_id und secret in der shariff.json?
Geht das mit folgenden Zeilen nach der Definition des "services" Array oder wie muss man das angeben?


    "services": [
        "GooglePlus",
        "Twitter",
        "Facebook",
        "LinkedIn",
        "Reddit",
        "StumbleUpon",
        "Flattr",
        "Pinterest",
        "Xing"
    ],
    "Facebook": {
        "app_id": "meineApp_id",
        "secret": "meinSecret"
    }

Vielen Dank!

Build process and repository structure

Hi,
wie ihr ja wisst habe ich in der jüngsten Zeit exzessiv mit dem Projekt hier rumgespielt... und das einzige das am php-Backend nervt: der Build-Prozess

Nun, aktuell haben wir das build-Verzeichnis im repo.
Geile Sache erstmal - keiner will composer einrichten und all the dependencies fetchen

First World Problems
  • wir vergessen ./build.sh vor dem commit - quasi immer?
  • wir vergessen build/ zu testen - könnte Travis-CI übernehmen (btw: Ich glaube das würde aktuell failen)
  • wir vergessen regelmäßig die dependencies zu updaten - was dazu führt das wir uns gegenseitig neue/alte Versionen in build/ überschreiben
  • diffs, ganz speziell nach composer updates, sind verdammt schwer zu lesen
Vorschlag

Im master-Branch den reinen Code lassen und build/ entfernen.
Einen separaten build-Branch erstellen in dem vendor/ geupdated wird - ganz groß in der README.md darauf verweißen.

Eventuell per pre-commit Script tests und build erzwingen?

Was haltet Ihr davon?

Backend liefert nur für Pinterest Daten zurück

Hallo,

ich habe das aktuelle Backend auf einem Windows Server 2008 R2 mit PHP 5.6.10 installiert und konfiguriert.
Ein Testaufruf von https://www.ulc-moedling.at/shariff-backend/?url=https://www.ulc-moedling.at liefert aber nur {"pinterest":0} zurück, obwohl alle Services in der shariff.json sind:

{
    "cache": {
        "ttl": 60,
        "cacheDir": "C:\\Inetpub\\vhosts\\ulc-moedling.at\\httpdocs\\cache\\shariff_manuell"
    },
    "domain": "www.ulc-moedling.at",
    "services": [
        "GooglePlus",
        "Twitter",
        "Facebook",
        "LinkedIn",
        "Reddit",
        "StumbleUpon",
        "Flattr",
        "Pinterest",
        "Xing"
    ]
}

Das Cache-Verzeichnis existiert und darin befindet sich im Unterordner Shariff-8a eine Datei namens Shariff-c405a2c5b1796ce4d3d874fa29e33051.dat mit Inhalt {"pinterest":0}

Was könnte der Grund dafür sein, dass kein anderes Service bei uns Daten liefert? Rufe ich die API-Aufrufe der Services, die ich aus den Dateien wie src/Backend/Twitter.php extrahiert habe, manuell im Browser auf, wie z.B. https://cdn.api.twitter.com/1/urls/count.json?url=https://www.ulc-moedling.at liefern diese API-Aufrufe sehr wohl Daten zurück.

Ich würde mich sehr freuen, wenn ich diese Dinge mit eurer Hilfe lösen könnte!

Keine Zähler in Drupal mit dem Drupal plugin SharuffSharingButtons

Die Buttons werden angezeigt, aber leider ohne Zähler.

Gezählt wird aber laut https://www.familierott.de/shariff-backend/?url=https%3A%2F%2Fwww.familierott.de%2Fdrupal%2Fnode%2F60
Hier das Ergbnis: {"googleplus":0,"twitter":0,"facebook":5,"linkedin":0,"reddit":0,"stumbleupon":0,"flattr":0,"pinterest":0,"xing":0}

Unter der Modulkonfiguration habe ich das Backend Verzeichnis mit http://www.familierott.de/shariff-backend/ angegeben.
die shariff.json sieht folgendermaßen aus:
{
"cache": {
"ttl": 60,
"cacheDir": "/tmp/shariff/cache"
},
"domain": "www.familierott.de",
"services": [
"GooglePlus",
"Twitter",
"Facebook",
"LinkedIn",
"Reddit",
"StumbleUpon",
"Flattr",
"Pinterest",
"Xing"
]
}

Habe ich etwas übersehen?

Probleme mit shariff als subdomain

Hallo,

da ich mehrere Websites betreibe und shariff nur einmal einrichten möchte - um Updates zu vereinfachen - habe ich shariff in einer subdomain einer meiner Websites installiert (shariff.domain.de) und dort alle genutzten Domains eingetragen.

Solange ich shariff im Unterordner /shariff/ eingerichtet hatte, klappte die Anzeige auch einwandfrei.

Code: data-backend-url="/shariff/"

Beim Aufruf von shariff via Subdomain werden aber bei Facebook, Google+ etc. keine Counter angezeigt. Wenn ich einen Testlink direkt aufrufe bekomme ich aber ein Array mit den entsprechenden Werten angezeigt.

Code: data-backend-url="http://shariff.domain.de/"

Hat jemand eine Idee, woran das liegen könnte?

Danke im Voraus / VG

Frank-Andre

Keine Zähler

Nach einigen Stunden Suche weiß ich leider keine andere Möglichkeit mehr, als hier zu fragen.
Ich habe statt der Social Media Buttons nun Shariff bei mir installiert. Funktioniert auch, aber ich bekomme keine Zähler.

Testseite unter www.skyynet.de/_test.htm

Auf meinem Server läuft PHP 5.5, Das Backend liegt unter www.skyynet.de/shariff
Die json habe ich konfiguriert unter www.skyynet.de/shariff/shariff.json

Auf der Seite habe ich die Buttons eingebunden über

Wenn ich den testweise http://www.skyynet.de/shariff/?url=http%3A%2F%2Fwww.skyynet.de aufrufe, erhalte ich nur [].

usability

Now you cut out user, that have problems installing composer.
For this you need an installed php, what is pain in the ass itself.
So you should bring back the build folder or add the vendor --no-dev to the repo.
Then you still have tons of unused stuff.

Facebook App settings

On my test site Google+ counts and Xing counts work fine, but Facebook counts are not shown out of the box. I'm on my own IP, so that shouldn't be an issue.

I created a Facebook App and added the lines

"Facebook": {
        "app_id": "1234",
        "secret": "Mein_App-Geheimcode"
 }

to my shariff.json. However it still doesn't work. If I try http://mydomain.de/shariff/backend/?url=http%3A%2F%2Fmydomain.de/shariff-test.html I get an error 500.

All I did in the Facebook app was make it public ("Deine App ist gerade live und öffentlich verfügbar."). Do I need to do something else in the app (more permissions) ?

Failed to load resource /backend/index.php

Ich setze das WordPress-Plugin Shariff ein und auf allen Seiten, auf denen die Share Buttons dargestellt werden, erscheint in der Browser-Konsole die folgende Fehlermeldung:

Failed to load resource: the server responded with a status of 500 (Internal Server Error)
Beispiel:
http://www.danielbaer.eu/wp-content/plugins/shariff-sharing/backend/index.php?url=http%3A%2F%2Fwww.danielbaer.eu%2Fkontakt%2F&ttl=30&service=gftl

Ich habe das bereits dem Entwickler gemeldet (https://wordpress.org/support/topic/error-failed-to-load-resource?replies=6), allerdings kommt das Problem auch in der originalen Backend-Datei vor.
Kann das reproduziert werden?

Shariff-Backend anpassen

Liebes Forum,
könnt ihr mir bitte weiterhelfen?
Wie kann ich die index.php im shariff/backend mit den Pfaden anpassen, damit es passt.
Ich denke, an dieser Stelle (Original-Datei) habe ich die Pfade falsch angelegt:

require_once DIR.'/vendor/autoload.php';

use Heise\Shariff\Backend;
use Zend\Config\Reader\Json;

Die Buttons werden angezeigt, aber die Counter nicht geladen.
http://eutonia.de/neu/shariff-backend-php-master/

Ich verwende PHP 5.2. - da muss ich wohl auch ein CacheDir anlegen in der shariff.json?

"cache": {
    "ttl": 60,
    "cacheDir": "cache"
},
"domain": "www.eutonia.de/neu",

Danke für's Lesen und eure Hilfe. :)
Ines

Facebook count not returned on live server

I have tested Shariff successfully locally, and then deployed to our live website.

Locally, I get the following result for a request to the backend:
{"googleplus":20,"twitter":16,"facebook":242}

The same script on the server only returns the following:
{"googleplus":20,"twitter":16}

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.