Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author addthis_matt

    (@addthis_matt)

    Hi there,

    We’ve recently changed to using Facebook’s Share Dialog endpoint, rather than their sharer.php endpoint as we were previously using. Facebook’s Share Dialog endpoint requires a valid Facebook App ID to be passed, along with a Redirect URI that you can setup within your Facebook App settings.

    To override the “Published by AddThis Sharing” text at the top, you can add the following code to your site. Just be sure to add your Facebook App ID and Redirect URI.

    window.addthis_share = {
    passthrough: {
    facebook: {
    app_id: ‘Insert Your Facebook App ID’,
    redirect_uri: ‘Insert Your Facebook App Redirect URI’
    }
    }
    };

    https://developers.facebook.com/docs/sharing/reference/share-dialog

    Thread Starter joshbot

    (@joshbot)

    Thanks for that, Matt!
    This may be a super obvious question, but is there a specific file to which i should add this code to override the default functionality?
    thanks again!

    Plugin Author addthis_matt

    (@addthis_matt)

    You can either add the code into the addthis_share field, within the Advanced Options within the plugin, or add it within a <script> tag and place it within the Footer template.

    Pasting the snippet above in the field just gives the error:

    Wrong JSON format

    However, inside script tags it works, but I would like to use the field instead, so please provide the correct “format”.

    Plugin Author addthis_matt

    (@addthis_matt)

    Hi Jonas,

    The format I provided was for adding the code within a <script> tag.

    If you’d prefer to add the code within the addthis_share variable field (under Advanced Options in the plugin), you can do so by changing it to JSON format instead.
    https://screencast.com/t/RfvTbPR1K4U

    {
    “passthrough”:{
    “facebook”:{
    “app_id”:”Insert Your Facebook App ID”,
    “redirect_uri”:”Insert Your Facebook App Redirect URI”
    }
    }
    }

    Just be sure to insert your Facebook App ID and Redirect URI.

    Hi, could you let us know how to update our own “app id” and “redirect uri” to addthis plugin. i tried adding above code with app id and url in Advance Options of settings as per image shown, but it says “Invalid JSON format”
    also tried adding in footer as script but still didnt work.
    Please Let me know if there is any way to solve this issue.
    awaiting your replay,
    thanks in advance.

    Plugin Author addthis_matt

    (@addthis_matt)

    I apologize, as the code I sent previously wasn’t wrapped in a code block and it turned the straight quotes into curly quotes. Can you try adding this into addthis_share instead?

    {
    "passthrough":{
    "facebook":{
    "app_id":"Insert Your Facebook App ID",
    "redirect_uri":"Insert Your Facebook App Redirect URI"
    }
    }
    }

    Hi, works like a charm.
    Thank you.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Facebook posts showing "Addthis Sharing" when shared from addthis button in blog’ is closed to new replies.